[INFO] cloning repository https://github.com/iltumio/uncrx-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/iltumio/uncrx-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Filtumio%2Funcrx-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Filtumio%2Funcrx-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] bd588e96362a24da620978957977f0c54d676a82 [INFO] linting iltumio/uncrx-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Filtumio%2Funcrx-rs" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/iltumio/uncrx-rs [INFO] finished tweaking git repo https://github.com/iltumio/uncrx-rs [INFO] tweaked toml for git repo https://github.com/iltumio/uncrx-rs written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/iltumio/uncrx-rs 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/iltumio/uncrx-rs 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded deflate64 v0.1.9 [INFO] [stderr] Downloaded ppmd-rust v1.3.0 [INFO] [stderr] Downloaded zip v7.0.0 [INFO] [stderr] Downloaded lzma-rust2 v0.15.4 [INFO] [stderr] Downloaded syn v2.0.102 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] a192852f8f68332ceffa636431e1bee4f7d16870075892a4c283d1c1343efba8 [INFO] running `Command { std: "docker" "start" "-a" "a192852f8f68332ceffa636431e1bee4f7d16870075892a4c283d1c1343efba8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a192852f8f68332ceffa636431e1bee4f7d16870075892a4c283d1c1343efba8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a192852f8f68332ceffa636431e1bee4f7d16870075892a4c283d1c1343efba8", kill_on_drop: false }` [INFO] [stdout] a192852f8f68332ceffa636431e1bee4f7d16870075892a4c283d1c1343efba8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 57ad3a71f70225c0e1346b5d3f11789f968e7751cb57d934fc4b2507af1400e5 [INFO] running `Command { std: "docker" "start" "-a" "57ad3a71f70225c0e1346b5d3f11789f968e7751cb57d934fc4b2507af1400e5", kill_on_drop: false }` [INFO] [stderr] Compiling rustversion v1.0.21 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Compiling indoc v2.0.6 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking lru v0.16.2 [INFO] [stderr] Compiling cc v1.2.26 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking anstyle-parse v0.2.3 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking line-clipping v0.3.5 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking anstyle v1.0.4 [INFO] [stderr] Checking anstyle-query v1.0.2 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking zlib-rs v0.5.1 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking clap_lex v0.6.0 [INFO] [stderr] Compiling anyhow v1.0.79 [INFO] [stderr] Checking libbz2-rs-sys v0.2.2 [INFO] [stderr] Checking anstream v0.6.11 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Checking bumpalo v3.18.1 [INFO] [stderr] Checking hashbrown v0.15.4 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking lzma-rust2 v0.15.4 [INFO] [stderr] Checking clap_builder v4.4.18 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking pbkdf2 v0.12.2 [INFO] [stderr] Compiling syn v2.0.102 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking castaway v0.2.3 [INFO] [stderr] Checking deflate64 v0.1.9 [INFO] [stderr] Checking compact_str v0.9.0 [INFO] [stderr] Checking ppmd-rust v1.3.0 [INFO] [stderr] Checking zopfli v0.8.2 [INFO] [stderr] Checking bzip2 v0.6.1 [INFO] [stderr] Checking unicode-truncate v2.0.0 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Compiling zstd-sys v2.0.15+zstd.1.5.7 [INFO] [stderr] Checking libz-rs-sys v0.5.1 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking tempfile v3.20.0 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling strum_macros v0.27.2 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Checking zip v7.0.0 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking kasuari v0.4.11 [INFO] [stderr] Checking clap v4.4.18 [INFO] [stderr] Checking strum v0.27.2 [INFO] [stderr] Checking ratatui-core v0.1.0 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Compiling instability v0.3.7 [INFO] [stderr] Checking ratatui-widgets v0.3.0 [INFO] [stderr] Checking ratatui-crossterm v0.1.0 [INFO] [stderr] Checking ratatui-macros v0.7.0 [INFO] [stderr] Checking ratatui v0.30.0 [INFO] [stderr] Checking uncrx-rs v0.2.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/uncrx/helpers.rs:51:35 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn get_slice_from_range(data: &Vec, range: Range) -> anyhow::Result<&[u8]> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - pub fn get_slice_from_range(data: &Vec, range: Range) -> anyhow::Result<&[u8]> { [INFO] [stdout] 51 + pub fn get_slice_from_range(data: &[u8], range: Range) -> anyhow::Result<&[u8]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/uncrx/helpers.rs:51:35 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn get_slice_from_range(data: &Vec, range: Range) -> anyhow::Result<&[u8]> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - pub fn get_slice_from_range(data: &Vec, range: Range) -> anyhow::Result<&[u8]> { [INFO] [stdout] 51 + pub fn get_slice_from_range(data: &[u8], range: Range) -> anyhow::Result<&[u8]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | if !fs::metadata(dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(dir_path).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: length comparison to zero [INFO] [stdout] --> src/lib.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | archive.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!archive.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/lib.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | / for entry in entries { [INFO] [stdout] 133 | | if let Ok(entry) = entry { [INFO] [stdout] 134 | | let path = entry.path(); [INFO] [stdout] 135 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 141 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/lib.rs:133:21 [INFO] [stdout] | [INFO] [stdout] 133 | / if let Ok(entry) = entry { [INFO] [stdout] 134 | | let path = entry.path(); [INFO] [stdout] 135 | | if path.is_file() { [INFO] [stdout] 136 | | files.push(path); [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 132 ~ for entry in entries.flatten() { [INFO] [stdout] 133 + let path = entry.path(); [INFO] [stdout] 134 + if path.is_file() { [INFO] [stdout] 135 + files.push(path); [INFO] [stdout] 136 + } else if path.is_dir() { [INFO] [stdout] 137 + walk_directory(&path, files); [INFO] [stdout] 138 + } [INFO] [stdout] 139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/cli/errors.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | impl Into for UncrxCliError { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 23 ~ impl From for ErrorKind { [INFO] [stdout] 24 ~ fn from(val: UncrxCliError) -> Self { [INFO] [stdout] 25 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli/helpers.rs:7:37 [INFO] [stdout] | [INFO] [stdout] 7 | cmd.error(error.clone().into(), &error.to_string()).exit(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `error.to_string()` [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: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> tests/cli_extraction_test.rs:177:17 [INFO] [stdout] | [INFO] [stdout] 177 | / for entry in entries { [INFO] [stdout] 178 | | if let Ok(entry) = entry { [INFO] [stdout] 179 | | let path = entry.path(); [INFO] [stdout] 180 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 192 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> tests/cli_extraction_test.rs:178:21 [INFO] [stdout] | [INFO] [stdout] 178 | / if let Ok(entry) = entry { [INFO] [stdout] 179 | | let path = entry.path(); [INFO] [stdout] 180 | | if path.is_file() { [INFO] [stdout] 181 | | let relative_path = path [INFO] [stdout] ... | [INFO] [stdout] 191 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 ~ for entry in entries.flatten() { [INFO] [stdout] 178 + let path = entry.path(); [INFO] [stdout] 179 + if path.is_file() { [INFO] [stdout] 180 + let relative_path = path [INFO] [stdout] 181 + .strip_prefix(base) [INFO] [stdout] 182 + .unwrap() [INFO] [stdout] 183 + .to_string_lossy() [INFO] [stdout] 184 + .to_string(); [INFO] [stdout] 185 + let content = fs::read(&path).expect("Should be able to read file"); [INFO] [stdout] 186 + files.push((relative_path, content)); [INFO] [stdout] 187 + } else if path.is_dir() { [INFO] [stdout] 188 + walk_dir(&path, base, files); [INFO] [stdout] 189 + } [INFO] [stdout] 190 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> tests/integration_tests.rs:156:13 [INFO] [stdout] | [INFO] [stdout] 156 | / for entry in entries { [INFO] [stdout] 157 | | if let Ok(entry) = entry { [INFO] [stdout] 158 | | let path = entry.path(); [INFO] [stdout] 159 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 170 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> tests/integration_tests.rs:157:17 [INFO] [stdout] | [INFO] [stdout] 157 | / if let Ok(entry) = entry { [INFO] [stdout] 158 | | let path = entry.path(); [INFO] [stdout] 159 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 169 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 156 ~ for entry in entries.flatten() { [INFO] [stdout] 157 + let path = entry.path(); [INFO] [stdout] 158 + if path.is_file() { [INFO] [stdout] 159 + // Verify we can read the file [INFO] [stdout] 160 + assert!( [INFO] [stdout] 161 + fs::read(&path).is_ok(), [INFO] [stdout] 162 + "Should be able to read extracted file: {}", [INFO] [stdout] 163 + path.display() [INFO] [stdout] 164 + ); [INFO] [stdout] 165 + } else if path.is_dir() { [INFO] [stdout] 166 + check_file_permissions(&path); [INFO] [stdout] 167 + } [INFO] [stdout] 168 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/cli/errors.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | impl Into for UncrxCliError { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 23 ~ impl From for ErrorKind { [INFO] [stdout] 24 ~ fn from(val: UncrxCliError) -> Self { [INFO] [stdout] 25 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli/helpers.rs:7:37 [INFO] [stdout] | [INFO] [stdout] 7 | cmd.error(error.clone().into(), &error.to_string()).exit(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `error.to_string()` [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: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> tests/integration_tests.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 270 | / for entry in entries { [INFO] [stdout] 271 | | if let Ok(entry) = entry { [INFO] [stdout] 272 | | let path = entry.path(); [INFO] [stdout] 273 | | let name = path.file_name().and_then(|n| n.to_str()).unwrap_or("?"); [INFO] [stdout] ... | [INFO] [stdout] 286 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> tests/integration_tests.rs:271:13 [INFO] [stdout] | [INFO] [stdout] 271 | / if let Ok(entry) = entry { [INFO] [stdout] 272 | | let path = entry.path(); [INFO] [stdout] 273 | | let name = path.file_name().and_then(|n| n.to_str()).unwrap_or("?"); [INFO] [stdout] ... | [INFO] [stdout] 285 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 270 ~ for entry in entries.flatten() { [INFO] [stdout] 271 + let path = entry.path(); [INFO] [stdout] 272 + let name = path.file_name().and_then(|n| n.to_str()).unwrap_or("?"); [INFO] [stdout] 273 + [INFO] [stdout] 274 + println!( [INFO] [stdout] 275 + "{}{}{}", [INFO] [stdout] 276 + " ".repeat(indent), [INFO] [stdout] 277 ~ if path.is_dir() { "📁 " } else { "📄 " }, [INFO] [stdout] 278 + name [INFO] [stdout] 279 + ); [INFO] [stdout] 280 + [INFO] [stdout] 281 + if path.is_dir() { [INFO] [stdout] 282 + print_directory_structure(&path, indent + 1); [INFO] [stdout] 283 + } [INFO] [stdout] 284 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> tests/integration_tests.rs:296:13 [INFO] [stdout] | [INFO] [stdout] 296 | / for entry in entries { [INFO] [stdout] 297 | | if let Ok(entry) = entry { [INFO] [stdout] 298 | | let path = entry.path(); [INFO] [stdout] 299 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 305 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> tests/integration_tests.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 297 | / if let Ok(entry) = entry { [INFO] [stdout] 298 | | let path = entry.path(); [INFO] [stdout] 299 | | if path.is_file() { [INFO] [stdout] 300 | | files.push(path); [INFO] [stdout] ... | [INFO] [stdout] 304 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 296 ~ for entry in entries.flatten() { [INFO] [stdout] 297 + let path = entry.path(); [INFO] [stdout] 298 + if path.is_file() { [INFO] [stdout] 299 + files.push(path); [INFO] [stdout] 300 + } else if path.is_dir() { [INFO] [stdout] 301 + walk_dir(&path, files); [INFO] [stdout] 302 + } [INFO] [stdout] 303 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 32.95s [INFO] running `Command { std: "docker" "inspect" "57ad3a71f70225c0e1346b5d3f11789f968e7751cb57d934fc4b2507af1400e5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "57ad3a71f70225c0e1346b5d3f11789f968e7751cb57d934fc4b2507af1400e5", kill_on_drop: false }` [INFO] [stdout] 57ad3a71f70225c0e1346b5d3f11789f968e7751cb57d934fc4b2507af1400e5