Allows use of slightly optimized variants that check if they have to use
the heavier vte parser. Tries to avoid unnnecessary allocations. Initial
performance characteristics proven out in #4378.
Also reduces boilerplate with right-ward drift.
* Apply clippy fix to avoid extra allocation
error: `format!(..)` appended to existing `String`
--> crates/nu-engine/src/documentation.rs:82:9
|
82 | long_desc.push_str(&format!("\n{G}Subcommands{RESET}:\n"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::format-push-string` implied by `-D warnings`
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> crates/nu-engine/src/documentation.rs:96:9
|
96 | long_desc.push_str(&format!("\n{G}Parameters{RESET}:\n"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> crates/nu-engine/src/documentation.rs:128:9
|
128 | long_desc.push_str(&format!("\n{}Examples{}:", G, RESET));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> crates/nu-engine/src/documentation.rs:202:5
|
202 | long_desc.push_str(&format!("\n{}Flags{}:\n", G, RESET));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: could not compile `nu-engine` due to 4 previous errors
* Apply clippy fix to avoid deref on an immutable reference
error: deref on an immutable reference
--> crates/nu-command/src/dataframe/eager/sql_context.rs:188:77
|
188 | SetExpr::Select(select_stmt) => self.execute_select(&*select_stmt)?,
| ^^^^^^^^^^^^^
|
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
help: if you would like to reborrow, try removing `&*`
|
188 | SetExpr::Select(select_stmt) => self.execute_select(select_stmt)?,
| ~~~~~~~~~~~
help: if you would like to deref, try using `&**`
|
188 | SetExpr::Select(select_stmt) => self.execute_select(&**select_stmt)?,
| ~~~~~~~~~~~~~~
error: deref on an immutable reference
--> crates/nu-command/src/database/values/dsl/expression.rs:252:15
|
252 | match &*expr {
| ^^^^^^ help: if you would like to reborrow, try removing `&*`: `expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
error: could not compile `nu-command` due to 2 previous errors
* Add source-env test for dynamic path
* Use correct module ID for env overlay imports
* Remove parser check from "overlay list"
It would cause unnecessary errors from some inner scope if some
overlay module was also defined in some inner scope.
* Restore Cargo.lock back
* Remove comments
* start working on source-env
* WIP
* Get most tests working, still one to go
* Fix file-relative paths; Report parser error
* Fix merge conflicts; Restore source as deprecated
* Tests: Use source-env; Remove redundant tests
* Fmt
* Respect hidden env vars
* Fix file-relative eval for source-env
* Add file-relative eval to "overlay use"
* Use FILE_PWD only in source-env and "overlay use"
* Ignore new tests for now
This will be another issue
* Throw an error if setting FILE_PWD manually
* Fix source-related test failures
* Fix nu-check to respect FILE_PWD
* Fix corrupted spans in source-env shell errors
* Fix up some references to old source
* Remove deprecation message
* Re-introduce deleted tests
Co-authored-by: kubouch <kubouch@gmail.com>
* expand durations to include month, year, decade
* remove commented out fn
* oops, found more debug comments
* tweaked tests for the new way, borrowed heavily from chrono-humanize-rs
* clippy
* grammar