v0.5.3 #84
clippy
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.76.0 (07dca489a 2024-02-04)
- cargo 1.76.0 (c84b36747 2024-01-18)
- clippy 0.1.76 (07dca48 2024-02-04)
Annotations
Check warning on line 303 in src/toolbox/tool.rs
github-actions / clippy
useless conversion to the same type: `std::env::VarsOs`
warning: useless conversion to the same type: `std::env::VarsOs`
--> src/toolbox/tool.rs:302:23
|
302 | let new_env = env::vars_os()
| _______________________^
303 | | .into_iter()
| |________________________^ help: consider removing `.into_iter()`: `env::vars_os()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
Check warning on line 281 in src/toolbox/tool.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/toolbox/tool.rs:281:40
|
281 | let mut command = Command::new(&bin);
| ^^^^ help: change this to: `bin`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 697 in src/completion/zsh.rs
github-actions / clippy
use of `unwrap_or_else` to construct default value
warning: use of `unwrap_or_else` to construct default value
--> src/completion/zsh.rs:697:39
|
697 | value_completion(arg).unwrap_or_else(|| "".to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
Check warning on line 254 in src/completion/zsh.rs
github-actions / clippy
dereferencing a tuple pattern where every element takes a reference
warning: dereferencing a tuple pattern where every element takes a reference
--> src/completion/zsh.rs:254:9
|
254 | for &(ref name, ref bin_name) in &subcommand_names {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
254 - for &(ref name, ref bin_name) in &subcommand_names {
254 + for (name, bin_name) in &subcommand_names {
|
Check warning on line 136 in src/completion/zsh.rs
github-actions / clippy
dereferencing a tuple pattern where every element takes a reference
warning: dereferencing a tuple pattern where every element takes a reference
--> src/completion/zsh.rs:136:9
|
136 | for &(_, ref bin_name) in &all_subcommands {
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
= note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
|
136 - for &(_, ref bin_name) in &all_subcommands {
136 + for (_, bin_name) in &all_subcommands {
|
Check warning on line 263 in src/cmd/shell.rs
github-actions / clippy
use of `format!` to build up a string from an iterator
warning: use of `format!` to build up a string from an iterator
--> src/cmd/shell.rs:260:25
|
260 | / err_msg
261 | | .split_inclusive('\n')
262 | | .map(|x| format!("# {}", x))
263 | | .collect::<String>(),
| |________________________________________________^
|
help: call `fold` instead
--> src/cmd/shell.rs:262:30
|
262 | ... .map(|x| format!("# {}", x))
| ^^^
help: ... and use the `write!` macro here
--> src/cmd/shell.rs:262:38
|
262 | ... .map(|x| format!("# {}", x))
| ^^^^^^^^^^^^^^^^^^
= note: this can be written more efficiently by appending to a `String` directly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
= note: `#[warn(clippy::format_collect)]` on by default