bump deps and edition #3
Clippy Output
5 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 5 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 85 in src/main.rs
github-actions / Clippy Output
unneeded late initialization
warning: unneeded late initialization
--> src/main.rs:85:5
|
85 | let log_level: String;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
help: declare `log_level` here
|
86 | let log_level: String = if matches.get_flag("quiet") {
| +++++++++++++++++++++++
help: remove the assignments from the branches
|
87 ~ String::from("warn")
88 | } else {
89 ~ String::from("info")
|
help: add a semicolon after the `if` expression
|
90 | };
| +
Check warning on line 171 in src/config.rs
github-actions / Clippy Output
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/config.rs:171:79
|
171 | let mut file = match OpenOptions::new().write(true).create_new(true).open(&path) {
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 131 in src/config.rs
github-actions / Clippy Output
unneeded late initialization
warning: unneeded late initialization
--> src/config.rs:131:9
|
131 | let invert: bool;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
help: declare `invert` here
|
132 | let invert: bool = match sink.invert {
| ++++++++++++++++++
help: remove the assignments from the `match` arms
|
133 ~ None => false,
134 ~ Some(val) => val,
|
help: add a semicolon after the `match` expression
|
135 | };
| +
Check warning on line 117 in src/config.rs
github-actions / Clippy Output
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/config.rs:117:39
|
117 | file = match File::create(&path) {
| ^^^^^ help: change this to: `path`
|
= 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 96 in src/config.rs
github-actions / Clippy Output
unneeded late initialization
warning: unneeded late initialization
--> src/config.rs:96:9
|
96 | let file: Option<BufWriter<std::fs::File>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
= note: `#[warn(clippy::needless_late_init)]` on by default
help: declare `file` here
|
97 | let file: Option<BufWriter<std::fs::File>> = if sink.file_name == "null" || validate_only {
| ++++++++++++++++++++++++++++++++++++++++++++
help: remove the assignments from the branches
|
98 ~ None
99 | } else {
...
116|
117~ match File::create(&path) {
118| Ok(file) => Some(std::io::BufWriter::new(file)),
...
127| }
128~ }
|
help: add a semicolon after the `if` expression
|
129| };
| +