[INFO] cloning repository https://github.com/ishechuan/exa-lite [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ishechuan/exa-lite" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fishechuan%2Fexa-lite", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fishechuan%2Fexa-lite'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7d25960b96518c9d7a09dfd21322a3e1a3017a88 [INFO] linting ishechuan/exa-lite against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fishechuan%2Fexa-lite" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ishechuan/exa-lite [INFO] finished tweaking git repo https://github.com/ishechuan/exa-lite [INFO] tweaked toml for git repo https://github.com/ishechuan/exa-lite written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ishechuan/exa-lite on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/ishechuan/exa-lite already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded assert_cmd v2.1.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c953cb352d501bcfa3de42bf0239bc47d1960cdbb41fe2db0d660d3e04a0696e [INFO] running `Command { std: "docker" "start" "-a" "c953cb352d501bcfa3de42bf0239bc47d1960cdbb41fe2db0d660d3e04a0696e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c953cb352d501bcfa3de42bf0239bc47d1960cdbb41fe2db0d660d3e04a0696e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c953cb352d501bcfa3de42bf0239bc47d1960cdbb41fe2db0d660d3e04a0696e", kill_on_drop: false }` [INFO] [stdout] c953cb352d501bcfa3de42bf0239bc47d1960cdbb41fe2db0d660d3e04a0696e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 86d6a1ad9923788893fb40331e0522d335c668410b98eaa28077827d15724102 [INFO] running `Command { std: "docker" "start" "-a" "86d6a1ad9923788893fb40331e0522d335c668410b98eaa28077827d15724102", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Compiling libc v0.2.179 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Checking anstyle-query v1.1.5 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Compiling assert_cmd v2.1.1 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking clap_builder v4.5.54 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking wait-timeout v0.2.1 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking bstr v1.12.1 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Checking exa-lite v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/color.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / /// 使用常量避免魔法数字,使代码更易读 [INFO] [stdout] 15 | | [INFO] [stdout] | |_^ [INFO] [stdout] 16 | /// 重置所有属性 [INFO] [stdout] 17 | pub(crate) const RESET: &str = "\x1b[0m"; [INFO] [stdout] | ---------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 13 ~ //! ANSI 转义序列常量 [INFO] [stdout] 14 ~ //! 使用常量避免魔法数字,使代码更易读 [INFO] [stdout] | [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 15 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/color.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / /// 使用常量避免魔法数字,使代码更易读 [INFO] [stdout] 15 | | [INFO] [stdout] | |_^ [INFO] [stdout] 16 | /// 重置所有属性 [INFO] [stdout] 17 | pub(crate) const RESET: &str = "\x1b[0m"; [INFO] [stdout] | ---------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 13 ~ //! ANSI 转义序列常量 [INFO] [stdout] 14 ~ //! 使用常量避免魔法数字,使代码更易读 [INFO] [stdout] | [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 15 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/main.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/args.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | !std::env::var("NO_COLOR").is_ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::env::var("NO_COLOR").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dir.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / if let Some(max) = options.max_depth { [INFO] [stdout] 156 | | if current_depth >= max { [INFO] [stdout] 157 | | return Ok(()); [INFO] [stdout] 158 | | } [INFO] [stdout] 159 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ if let Some(max) = options.max_depth [INFO] [stdout] 156 ~ && current_depth >= max { [INFO] [stdout] 157 | return Ok(()); [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/dir.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | entries_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 167 - entries_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 167 + entries_vec.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dir.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | / if let Some(max) = options.max_depth { [INFO] [stdout] 210 | | if current_depth + 1 >= max { [INFO] [stdout] 211 | | continue; [INFO] [stdout] 212 | | } [INFO] [stdout] 213 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 209 ~ if let Some(max) = options.max_depth [INFO] [stdout] 210 ~ && current_depth + 1 >= max { [INFO] [stdout] 211 | continue; [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/dir.rs:240:14 [INFO] [stdout] | [INFO] [stdout] 240 | .map(|p| PathBuf::from(p)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `PathBuf::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/metadata.rs:226:23 [INFO] [stdout] | [INFO] [stdout] 226 | let year = 1970 + (days_since_1970 / 365) as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(days_since_1970 / 365)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/size.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 94 | / let padding = if char_width > width { [INFO] [stdout] 95 | | // 如果实际宽度超过指定宽度,使用实际宽度 [INFO] [stdout] 96 | | formatted [INFO] [stdout] 97 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 100 | | " ".repeat(width - char_width) + &formatted [INFO] [stdout] 101 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 102 | padding [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 94 ~ [INFO] [stdout] 95 ~ if char_width > width { [INFO] [stdout] 96 ~ // 如果实际宽度超过指定宽度,使用实际宽度 [INFO] [stdout] 97 + formatted [INFO] [stdout] 98 + } else { [INFO] [stdout] 99 ~ // 在左边填充空格使总宽度一致 [INFO] [stdout] 100 ~ // repeat() 方法创建指定数量的空格字符串 [INFO] [stdout] 101 + " ".repeat(width - char_width) + &formatted [INFO] [stdout] 102 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/types.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / pub(crate) fn new( [INFO] [stdout] 99 | | name: Box, [INFO] [stdout] 100 | | file_type: FileType, [INFO] [stdout] 101 | | permissions: Box, [INFO] [stdout] ... | [INFO] [stdout] 106 | | symlink_target: Option>, [INFO] [stdout] 107 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/args.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | !std::env::var("NO_COLOR").is_ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::env::var("NO_COLOR").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dir.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / if let Some(max) = options.max_depth { [INFO] [stdout] 156 | | if current_depth >= max { [INFO] [stdout] 157 | | return Ok(()); [INFO] [stdout] 158 | | } [INFO] [stdout] 159 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ if let Some(max) = options.max_depth [INFO] [stdout] 156 ~ && current_depth >= max { [INFO] [stdout] 157 | return Ok(()); [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/dir.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | entries_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 167 - entries_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 167 + entries_vec.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dir.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | / if let Some(max) = options.max_depth { [INFO] [stdout] 210 | | if current_depth + 1 >= max { [INFO] [stdout] 211 | | continue; [INFO] [stdout] 212 | | } [INFO] [stdout] 213 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 209 ~ if let Some(max) = options.max_depth [INFO] [stdout] 210 ~ && current_depth + 1 >= max { [INFO] [stdout] 211 | continue; [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/dir.rs:240:14 [INFO] [stdout] | [INFO] [stdout] 240 | .map(|p| PathBuf::from(p)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `PathBuf::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/dir.rs:275:22 [INFO] [stdout] | [INFO] [stdout] 275 | File::create(&path.join("file1.txt")).unwrap().write_all(b"content1").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `path.join("file1.txt")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/dir.rs:276:22 [INFO] [stdout] | [INFO] [stdout] 276 | File::create(&path.join("file2.txt")).unwrap().write_all(b"content2").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `path.join("file2.txt")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/dir.rs:279:22 [INFO] [stdout] | [INFO] [stdout] 279 | File::create(&path.join(".hidden")).unwrap().write_all(b"hidden").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `path.join(".hidden")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/dir.rs:282:28 [INFO] [stdout] | [INFO] [stdout] 282 | fs::create_dir_all(&path.join("subdir")).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `path.join("subdir")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/dir.rs:283:22 [INFO] [stdout] | [INFO] [stdout] 283 | File::create(&path.join("subdir").join("nested.txt")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `path.join("subdir").join("nested.txt")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/metadata.rs:226:23 [INFO] [stdout] | [INFO] [stdout] 226 | let year = 1970 + (days_since_1970 / 365) as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(days_since_1970 / 365)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/size.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 94 | / let padding = if char_width > width { [INFO] [stdout] 95 | | // 如果实际宽度超过指定宽度,使用实际宽度 [INFO] [stdout] 96 | | formatted [INFO] [stdout] 97 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 100 | | " ".repeat(width - char_width) + &formatted [INFO] [stdout] 101 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 102 | padding [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 94 ~ [INFO] [stdout] 95 ~ if char_width > width { [INFO] [stdout] 96 ~ // 如果实际宽度超过指定宽度,使用实际宽度 [INFO] [stdout] 97 + formatted [INFO] [stdout] 98 + } else { [INFO] [stdout] 99 ~ // 在左边填充空格使总宽度一致 [INFO] [stdout] 100 ~ // repeat() 方法创建指定数量的空格字符串 [INFO] [stdout] 101 + " ".repeat(width - char_width) + &formatted [INFO] [stdout] 102 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/types.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / pub(crate) fn new( [INFO] [stdout] 99 | | name: Box, [INFO] [stdout] 100 | | file_type: FileType, [INFO] [stdout] 101 | | permissions: Box, [INFO] [stdout] ... | [INFO] [stdout] 106 | | symlink_target: Option>, [INFO] [stdout] 107 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.27s [INFO] running `Command { std: "docker" "inspect" "86d6a1ad9923788893fb40331e0522d335c668410b98eaa28077827d15724102", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "86d6a1ad9923788893fb40331e0522d335c668410b98eaa28077827d15724102", kill_on_drop: false }` [INFO] [stdout] 86d6a1ad9923788893fb40331e0522d335c668410b98eaa28077827d15724102