[INFO] fetching crate htmd-cli 0.5.0... [INFO] linting htmd-cli-0.5.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate htmd-cli 0.5.0 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate htmd-cli 0.5.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate htmd-cli 0.5.0 [INFO] tweaked toml for crates.io crate htmd-cli 0.5.0 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate htmd-cli 0.5.0 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 crates.io crate htmd-cli 0.5.0 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 markup5ever v0.35.0 [INFO] [stderr] Downloaded anstyle-query v1.1.0 [INFO] [stderr] Downloaded clap_lex v0.7.1 [INFO] [stderr] Downloaded match_token v0.35.0 [INFO] [stderr] Downloaded html5ever v0.35.0 [INFO] [stderr] Downloaded web_atoms v0.1.2 [INFO] [stderr] Downloaded cc v1.0.99 [INFO] [stderr] Downloaded clap v4.5.7 [INFO] [stderr] Downloaded xml5ever v0.35.0 [INFO] [stderr] Downloaded toml_edit v0.22.14 [INFO] [stderr] Downloaded clap_builder v4.5.7 [INFO] [stderr] Downloaded markup5ever_rcdom v0.35.0+unofficial [INFO] [stderr] Downloaded htmd v0.5.0 [INFO] [stderr] Downloaded tokio v1.38.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] b97396f9f87e98d82f9da69ca788c59cc3bb9f8ef2dd62f44302c01a6d92147c [INFO] running `Command { std: "docker" "start" "-a" "b97396f9f87e98d82f9da69ca788c59cc3bb9f8ef2dd62f44302c01a6d92147c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b97396f9f87e98d82f9da69ca788c59cc3bb9f8ef2dd62f44302c01a6d92147c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b97396f9f87e98d82f9da69ca788c59cc3bb9f8ef2dd62f44302c01a6d92147c", kill_on_drop: false }` [INFO] [stdout] b97396f9f87e98d82f9da69ca788c59cc3bb9f8ef2dd62f44302c01a6d92147c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 1ba1a0daf92fe528a117d9123f659c1ec4dba39fbe0a77544b6cab722693a032 [INFO] running `Command { std: "docker" "start" "-a" "1ba1a0daf92fe528a117d9123f659c1ec4dba39fbe0a77544b6cab722693a032", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Compiling siphasher v0.3.11 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Checking mac v0.1.1 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Checking anstyle-query v1.1.0 [INFO] [stderr] Checking siphasher v1.0.1 [INFO] [stderr] Compiling proc-macro2 v1.0.103 [INFO] [stderr] Compiling phf_shared v0.13.1 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Checking futf v0.1.5 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Checking indexmap v2.2.6 [INFO] [stderr] Checking phf_shared v0.11.2 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking clap_lex v0.7.1 [INFO] [stderr] Checking winnow v0.6.13 [INFO] [stderr] Checking pin-project-lite v0.2.14 [INFO] [stderr] Checking tendril v0.4.3 [INFO] [stderr] Checking phf v0.11.2 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking glob v0.3.1 [INFO] [stderr] Compiling phf_generator v0.13.1 [INFO] [stderr] Checking clap_builder v4.5.7 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling syn v2.0.66 [INFO] [stderr] Compiling phf_generator v0.11.2 [INFO] [stderr] Compiling string_cache_codegen v0.5.4 [INFO] [stderr] Compiling phf_codegen v0.11.2 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking tokio v1.38.2 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Compiling web_atoms v0.1.2 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking clap v4.5.7 [INFO] [stderr] Checking uuid v1.8.0 [INFO] [stderr] Checking string_cache v0.8.9 [INFO] [stderr] Checking toml_datetime v0.6.6 [INFO] [stderr] Checking serde_spanned v0.6.6 [INFO] [stderr] Checking toml_edit v0.22.14 [INFO] [stderr] Compiling match_token v0.35.0 [INFO] [stderr] Compiling phf_macros v0.13.1 [INFO] [stderr] Checking markup5ever v0.35.0 [INFO] [stderr] Checking xml5ever v0.35.0 [INFO] [stderr] Checking html5ever v0.35.0 [INFO] [stderr] Checking phf v0.13.1 [INFO] [stderr] Checking toml v0.8.14 [INFO] [stderr] Checking markup5ever_rcdom v0.35.0+unofficial [INFO] [stderr] Checking htmd v0.5.0 [INFO] [stderr] Checking htmd-cli v0.5.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | const ABOUT: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/cli_options.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / let Some(tags_str) = matches.get_one::("ignored-tags") else { [INFO] [stdout] 30 | | return None; [INFO] [stdout] 31 | | }; [INFO] [stdout] | |______^ help: replace it with: `let tags_str = matches.get_one::("ignored-tags")?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | "atx" | _ => HeadingStyle::Atx, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | "asterisks" | _ => HrStyle::Asterisks, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | "two-spaces" | _ => BrStyle::TwoSpaces, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | "inlined" | _ => LinkStyle::Inlined, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | "full" | _ => LinkReferenceStyle::Full, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | "fenced" | _ => CodeBlockStyle::Fenced, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | "backticks" | _ => CodeBlockFence::Backticks, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | "asterisk" | _ => BulletListMarker::Asterisk, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | const ABOUT: &'static str = r#" [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/io_util.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / let Some(input_arg) = matches.get_one::(id) else { [INFO] [stdout] 34 | | return None; [INFO] [stdout] 35 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let input_arg = matches.get_one::(id)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/io_util.rs:41:47 [INFO] [stdout] | [INFO] [stdout] 41 | let files = get_html_files_from_input(&input_arg); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `input_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` 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/io_util.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / for entry in fs::read_dir(dir).unwrap() { [INFO] [stdout] 115 | | if let Ok(entry) = entry { [INFO] [stdout] 116 | | let child = entry.path(); [INFO] [stdout] 117 | | if possible_html_file(&child) { [INFO] [stdout] ... | [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/io_util.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / if let Ok(entry) = entry { [INFO] [stdout] 116 | | let child = entry.path(); [INFO] [stdout] 117 | | if possible_html_file(&child) { [INFO] [stdout] 118 | | files.push(child); [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [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] 114 ~ for entry in fs::read_dir(dir).unwrap().flatten() { [INFO] [stdout] 115 + let child = entry.path(); [INFO] [stdout] 116 + if possible_html_file(&child) { [INFO] [stdout] 117 + files.push(child); [INFO] [stdout] 118 + } [INFO] [stdout] 119 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/io_util.rs:125:29 [INFO] [stdout] | [INFO] [stdout] 125 | fn possible_html_file(path: &PathBuf) -> bool { [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] 125 - fn possible_html_file(path: &PathBuf) -> bool { [INFO] [stdout] 125 + fn possible_html_file(path: &Path) -> bool { [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/path_util.rs:3:38 [INFO] [stdout] | [INFO] [stdout] 3 | pub(crate) fn common_ancestor(paths: &Vec) -> Option { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - pub(crate) fn common_ancestor(paths: &Vec) -> Option { [INFO] [stdout] 3 + pub(crate) fn common_ancestor(paths: &[PathBuf]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:100:37 [INFO] [stdout] | [INFO] [stdout] 100 | let output_as_dir = !output.extension().is_some(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `output.extension().is_none()` [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: function call inside of `expect` [INFO] [stdout] --> src/main.rs:89:22 [INFO] [stdout] | [INFO] [stdout] 89 | .expect(format!("Failed to read file: {:?}", file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to read file: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:131:33 [INFO] [stdout] | [INFO] [stdout] 131 | fs::write(file, md).expect(format!("Failed to write to file: {:?}", file).as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to write to file: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:148:36 [INFO] [stdout] | [INFO] [stdout] 148 | fs::create_dir_all(output).expect(format!("Cannot create dir: {:?}", output).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot create dir: {:?}", output))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:153:37 [INFO] [stdout] | [INFO] [stdout] 153 | let base_dir = &common_ancestor(&files).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `files` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:194:34 [INFO] [stdout] | [INFO] [stdout] 194 | fs::read_to_string(file).expect(format!("Cannot read file as text: {:?}", file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot read file as text: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:198:10 [INFO] [stdout] | [INFO] [stdout] 198 | .expect(format!("Failed to parse html from file: {:?}", file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to parse html from file: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:218:18 [INFO] [stdout] | [INFO] [stdout] 218 | .expect(format!("Cannot create output dir: {:?}", output_dir).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot create output dir: {:?}", output_dir))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:222:14 [INFO] [stdout] | [INFO] [stdout] 222 | .expect(format!("Cannot write file: {:?}", output_file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot write file: {:?}", output_file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:224:32 [INFO] [stdout] | [INFO] [stdout] 224 | fs::write(output, &md).expect(format!("Cannot write file: {:?}", output).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot write file: {:?}", output))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/cli_options.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / let Some(tags_str) = matches.get_one::("ignored-tags") else { [INFO] [stdout] 30 | | return None; [INFO] [stdout] 31 | | }; [INFO] [stdout] | |______^ help: replace it with: `let tags_str = matches.get_one::("ignored-tags")?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | "atx" | _ => HeadingStyle::Atx, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | "asterisks" | _ => HrStyle::Asterisks, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | "two-spaces" | _ => BrStyle::TwoSpaces, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | "inlined" | _ => LinkStyle::Inlined, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | "full" | _ => LinkReferenceStyle::Full, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | "fenced" | _ => CodeBlockStyle::Fenced, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | "backticks" | _ => CodeBlockFence::Backticks, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/cli_options.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | "asterisk" | _ => BulletListMarker::Asterisk, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/io_util.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / let Some(input_arg) = matches.get_one::(id) else { [INFO] [stdout] 34 | | return None; [INFO] [stdout] 35 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let input_arg = matches.get_one::(id)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/io_util.rs:41:47 [INFO] [stdout] | [INFO] [stdout] 41 | let files = get_html_files_from_input(&input_arg); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `input_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` 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/io_util.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / for entry in fs::read_dir(dir).unwrap() { [INFO] [stdout] 115 | | if let Ok(entry) = entry { [INFO] [stdout] 116 | | let child = entry.path(); [INFO] [stdout] 117 | | if possible_html_file(&child) { [INFO] [stdout] ... | [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/io_util.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / if let Ok(entry) = entry { [INFO] [stdout] 116 | | let child = entry.path(); [INFO] [stdout] 117 | | if possible_html_file(&child) { [INFO] [stdout] 118 | | files.push(child); [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [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] 114 ~ for entry in fs::read_dir(dir).unwrap().flatten() { [INFO] [stdout] 115 + let child = entry.path(); [INFO] [stdout] 116 + if possible_html_file(&child) { [INFO] [stdout] 117 + files.push(child); [INFO] [stdout] 118 + } [INFO] [stdout] 119 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/io_util.rs:125:29 [INFO] [stdout] | [INFO] [stdout] 125 | fn possible_html_file(path: &PathBuf) -> bool { [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] 125 - fn possible_html_file(path: &PathBuf) -> bool { [INFO] [stdout] 125 + fn possible_html_file(path: &Path) -> bool { [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/path_util.rs:3:38 [INFO] [stdout] | [INFO] [stdout] 3 | pub(crate) fn common_ancestor(paths: &Vec) -> Option { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - pub(crate) fn common_ancestor(paths: &Vec) -> Option { [INFO] [stdout] 3 + pub(crate) fn common_ancestor(paths: &[PathBuf]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:100:37 [INFO] [stdout] | [INFO] [stdout] 100 | let output_as_dir = !output.extension().is_some(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `output.extension().is_none()` [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: function call inside of `expect` [INFO] [stdout] --> src/main.rs:89:22 [INFO] [stdout] | [INFO] [stdout] 89 | .expect(format!("Failed to read file: {:?}", file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to read file: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:131:33 [INFO] [stdout] | [INFO] [stdout] 131 | fs::write(file, md).expect(format!("Failed to write to file: {:?}", file).as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to write to file: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:148:36 [INFO] [stdout] | [INFO] [stdout] 148 | fs::create_dir_all(output).expect(format!("Cannot create dir: {:?}", output).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot create dir: {:?}", output))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:153:37 [INFO] [stdout] | [INFO] [stdout] 153 | let base_dir = &common_ancestor(&files).unwrap(); [INFO] [stdout] | ^^^^^^ help: change this to: `files` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:194:34 [INFO] [stdout] | [INFO] [stdout] 194 | fs::read_to_string(file).expect(format!("Cannot read file as text: {:?}", file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot read file as text: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:198:10 [INFO] [stdout] | [INFO] [stdout] 198 | .expect(format!("Failed to parse html from file: {:?}", file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to parse html from file: {:?}", file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:218:18 [INFO] [stdout] | [INFO] [stdout] 218 | .expect(format!("Cannot create output dir: {:?}", output_dir).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot create output dir: {:?}", output_dir))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:222:14 [INFO] [stdout] | [INFO] [stdout] 222 | .expect(format!("Cannot write file: {:?}", output_file).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot write file: {:?}", output_file))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:224:32 [INFO] [stdout] | [INFO] [stdout] 224 | fs::write(output, &md).expect(format!("Cannot write file: {:?}", output).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot write file: {:?}", output))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> tests/mod.rs:239:71 [INFO] [stdout] | [INFO] [stdout] 239 | fn exec_with_temp_fs(args: Vec<&str>, verify: impl FnOnce(PathBuf) -> ()) -> ExecResult { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> tests/mod.rs:246:37 [INFO] [stdout] | [INFO] [stdout] 246 | verify: impl FnOnce(PathBuf) -> (), [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> tests/mod.rs:252:19 [INFO] [stdout] | [INFO] [stdout] 252 | .join(format!("{}", uuid::Uuid::new_v4().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `uuid::Uuid::new_v4().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> tests/mod.rs:252:53 [INFO] [stdout] | [INFO] [stdout] 252 | .join(format!("{}", uuid::Uuid::new_v4().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> tests/mod.rs:255:14 [INFO] [stdout] | [INFO] [stdout] 255 | .expect(format!("Cannot setup temp dir: {:?}", temp_dir).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot setup temp dir: {:?}", temp_dir))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/mod.rs:258:13 [INFO] [stdout] | [INFO] [stdout] 258 | &temp_dir.join("cli-options.toml"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `temp_dir.join("cli-options.toml")` [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: function call inside of `expect` [INFO] [stdout] --> tests/mod.rs:292:14 [INFO] [stdout] | [INFO] [stdout] 292 | .expect(format!("Cannot delete temp dir: {}", temp_dir.to_str().unwrap()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot delete temp dir: {}", temp_dir.to_str().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> tests/mod.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | / for entry in fs::read_dir(dir).unwrap() { [INFO] [stdout] 322 | | if let Ok(entry) = entry { [INFO] [stdout] 323 | | let path = entry.path(); [INFO] [stdout] 324 | | if path.is_dir() { [INFO] [stdout] ... | [INFO] [stdout] 334 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> tests/mod.rs:322:13 [INFO] [stdout] | [INFO] [stdout] 322 | / if let Ok(entry) = entry { [INFO] [stdout] 323 | | let path = entry.path(); [INFO] [stdout] 324 | | if path.is_dir() { [INFO] [stdout] 325 | | if recursively { [INFO] [stdout] ... | [INFO] [stdout] 333 | | } [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] 321 ~ for entry in fs::read_dir(dir).unwrap().flatten() { [INFO] [stdout] 322 + let path = entry.path(); [INFO] [stdout] 323 + if path.is_dir() { [INFO] [stdout] 324 + if recursively { [INFO] [stdout] 325 + count += count_dir_file_count(&path, ext, true); [INFO] [stdout] 326 + } [INFO] [stdout] 327 + } else { [INFO] [stdout] 328 + if path.extension().unwrap().to_str().unwrap() == ext { [INFO] [stdout] 329 + count += 1; [INFO] [stdout] 330 + } [INFO] [stdout] 331 + } [INFO] [stdout] 332 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.24s [INFO] running `Command { std: "docker" "inspect" "1ba1a0daf92fe528a117d9123f659c1ec4dba39fbe0a77544b6cab722693a032", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1ba1a0daf92fe528a117d9123f659c1ec4dba39fbe0a77544b6cab722693a032", kill_on_drop: false }` [INFO] [stdout] 1ba1a0daf92fe528a117d9123f659c1ec4dba39fbe0a77544b6cab722693a032