[INFO] cloning repository https://github.com/antonio-leitao/printing-press [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/antonio-leitao/printing-press" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fantonio-leitao%2Fprinting-press", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fantonio-leitao%2Fprinting-press'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 08aad6ad12a7b2ddc11c586e20fd5ccdb03861e7 [INFO] linting antonio-leitao/printing-press against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fantonio-leitao%2Fprinting-press" "/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/antonio-leitao/printing-press [INFO] finished tweaking git repo https://github.com/antonio-leitao/printing-press [INFO] tweaked toml for git repo https://github.com/antonio-leitao/printing-press written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/antonio-leitao/printing-press 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/antonio-leitao/printing-press 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded thiserror-impl v1.0.49 [INFO] [stderr] Downloaded proc-macro2 v1.0.69 [INFO] [stderr] Downloaded thiserror v1.0.49 [INFO] [stderr] Downloaded anyhow v1.0.75 [INFO] [stderr] Downloaded shellexpand v3.1.0 [INFO] [stderr] Downloaded syn v2.0.38 [INFO] [stderr] Downloaded libc v0.2.149 [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] e4108162e3c341d035c50a1c46eaf9a13adc41f799fd05fd03e6cbba71d13f2d [INFO] running `Command { std: "docker" "start" "-a" "e4108162e3c341d035c50a1c46eaf9a13adc41f799fd05fd03e6cbba71d13f2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e4108162e3c341d035c50a1c46eaf9a13adc41f799fd05fd03e6cbba71d13f2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e4108162e3c341d035c50a1c46eaf9a13adc41f799fd05fd03e6cbba71d13f2d", kill_on_drop: false }` [INFO] [stdout] e4108162e3c341d035c50a1c46eaf9a13adc41f799fd05fd03e6cbba71d13f2d [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] 1bcd1dafef22458e554dfab8c0edb9d4c4c2ca9f8ca7fb451cf85da1b27d1c82 [INFO] running `Command { std: "docker" "start" "-a" "1bcd1dafef22458e554dfab8c0edb9d4c4c2ca9f8ca7fb451cf85da1b27d1c82", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.149 [INFO] [stderr] Compiling anyhow v1.0.75 [INFO] [stderr] Checking remove_dir_all v0.5.3 [INFO] [stderr] Checking minimal-lexical v0.2.1 [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Checking walkdir v2.4.0 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking shellexpand v3.1.0 [INFO] [stderr] Checking tempdir v0.3.7 [INFO] [stderr] Checking press v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/cli.rs:113:1 [INFO] [stdout] | [INFO] [stdout] 113 | / /// COMPOSITE FUNCTIONS [INFO] [stdout] 114 | | [INFO] [stdout] | |_^ [INFO] [stdout] 115 | pub fn print_general_help() { [INFO] [stdout] | ------------------------- the comment documents this function [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] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/cli.rs:113:1 [INFO] [stdout] | [INFO] [stdout] 113 | / /// COMPOSITE FUNCTIONS [INFO] [stdout] 114 | | [INFO] [stdout] | |_^ [INFO] [stdout] 115 | pub fn print_general_help() { [INFO] [stdout] | ------------------------- the comment documents this function [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli.rs:107:25 [INFO] [stdout] | [INFO] [stdout] 107 | is_boolean: !value.is_some(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `value.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: length comparison to zero [INFO] [stdout] --> src/cli.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | if flags.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!flags.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/theme.rs:18:28 [INFO] [stdout] | [INFO] [stdout] 18 | match latex_parser(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [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/theme.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / for entry in entries { [INFO] [stdout] 33 | | if let Ok(entry) = entry { [INFO] [stdout] 34 | | let path = entry.path(); [INFO] [stdout] 35 | | if !path.is_dir() { [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/theme.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / if let Ok(entry) = entry { [INFO] [stdout] 34 | | let path = entry.path(); [INFO] [stdout] 35 | | if !path.is_dir() { [INFO] [stdout] 36 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [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] 32 ~ for entry in entries.flatten() { [INFO] [stdout] 33 + let path = entry.path(); [INFO] [stdout] 34 + if !path.is_dir() { [INFO] [stdout] 35 + continue; [INFO] [stdout] 36 + } [INFO] [stdout] 37 + if let Some(folder_name) = path.file_name() { [INFO] [stdout] 38 + if let Some(name) = folder_name.to_str() { [INFO] [stdout] 39 + directories.push(name.to_string()); [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] 42 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/writer.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | fs::create_dir_all(&temp_content_dir)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `temp_content_dir` [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/writer.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | fs::copy(&entry.path(), &destination_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `entry.path()` [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/writer.rs:38:31 [INFO] [stdout] | [INFO] [stdout] 38 | for entry in WalkDir::new(&source_dir).into_iter().filter_map(|e| e.ok()) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `source_dir` [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/writer.rs:40:61 [INFO] [stdout] | [INFO] [stdout] 40 | temp_content_dir.join(entry.path().strip_prefix(&source_dir).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `source_dir` [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/writer.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | fs::copy(&entry.path(), &destination_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `entry.path()` [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/writer.rs:92:32 [INFO] [stdout] | [INFO] [stdout] 92 | fs::rename(&temp_pdf_path, &working_pdf_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `working_pdf_path` [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: this boolean expression can be simplified [INFO] [stdout] --> src/cli.rs:107:25 [INFO] [stdout] | [INFO] [stdout] 107 | is_boolean: !value.is_some(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `value.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: length comparison to zero [INFO] [stdout] --> src/cli.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | if flags.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!flags.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/theme.rs:18:28 [INFO] [stdout] | [INFO] [stdout] 18 | match latex_parser(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [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/theme.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / for entry in entries { [INFO] [stdout] 33 | | if let Ok(entry) = entry { [INFO] [stdout] 34 | | let path = entry.path(); [INFO] [stdout] 35 | | if !path.is_dir() { [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/theme.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / if let Ok(entry) = entry { [INFO] [stdout] 34 | | let path = entry.path(); [INFO] [stdout] 35 | | if !path.is_dir() { [INFO] [stdout] 36 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [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] 32 ~ for entry in entries.flatten() { [INFO] [stdout] 33 + let path = entry.path(); [INFO] [stdout] 34 + if !path.is_dir() { [INFO] [stdout] 35 + continue; [INFO] [stdout] 36 + } [INFO] [stdout] 37 + if let Some(folder_name) = path.file_name() { [INFO] [stdout] 38 + if let Some(name) = folder_name.to_str() { [INFO] [stdout] 39 + directories.push(name.to_string()); [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] 42 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/writer.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | fs::create_dir_all(&temp_content_dir)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `temp_content_dir` [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/writer.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | fs::copy(&entry.path(), &destination_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `entry.path()` [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/writer.rs:38:31 [INFO] [stdout] | [INFO] [stdout] 38 | for entry in WalkDir::new(&source_dir).into_iter().filter_map(|e| e.ok()) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `source_dir` [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/writer.rs:40:61 [INFO] [stdout] | [INFO] [stdout] 40 | temp_content_dir.join(entry.path().strip_prefix(&source_dir).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `source_dir` [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/writer.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | fs::copy(&entry.path(), &destination_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `entry.path()` [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/writer.rs:92:32 [INFO] [stdout] | [INFO] [stdout] 92 | fs::rename(&temp_pdf_path, &working_pdf_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `working_pdf_path` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.83s [INFO] running `Command { std: "docker" "inspect" "1bcd1dafef22458e554dfab8c0edb9d4c4c2ca9f8ca7fb451cf85da1b27d1c82", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1bcd1dafef22458e554dfab8c0edb9d4c4c2ca9f8ca7fb451cf85da1b27d1c82", kill_on_drop: false }` [INFO] [stdout] 1bcd1dafef22458e554dfab8c0edb9d4c4c2ca9f8ca7fb451cf85da1b27d1c82