[INFO] fetching crate single_source 0.1.5... [INFO] linting single_source-0.1.5 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate single_source 0.1.5 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate single_source 0.1.5 [INFO] finished tweaking crates.io crate single_source 0.1.5 [INFO] tweaked toml for crates.io crate single_source 0.1.5 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate single_source 0.1.5 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 single_source 0.1.5 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] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded normalize-line-endings v0.2.2 [INFO] [stderr] Downloaded assert_cmd v0.11.1 [INFO] [stderr] Downloaded escargot v0.4.0 [INFO] [stderr] Downloaded float-cmp v0.5.3 [INFO] [stderr] Downloaded predicates v1.0.2 [INFO] [stderr] Downloaded serde_json v1.0.44 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] ab10566fd4e8cf60d7131e3b7af5ed9442426428694dbc4a11a6052d9b7220a6 [INFO] running `Command { std: "docker" "start" "-a" "ab10566fd4e8cf60d7131e3b7af5ed9442426428694dbc4a11a6052d9b7220a6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ab10566fd4e8cf60d7131e3b7af5ed9442426428694dbc4a11a6052d9b7220a6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ab10566fd4e8cf60d7131e3b7af5ed9442426428694dbc4a11a6052d9b7220a6", kill_on_drop: false }` [INFO] [stdout] ab10566fd4e8cf60d7131e3b7af5ed9442426428694dbc4a11a6052d9b7220a6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 8c722ba37f3252ffd2faf08c7b6f2f855689c65989b52f10af965fdea71c9c83 [INFO] running `Command { std: "docker" "start" "-a" "8c722ba37f3252ffd2faf08c7b6f2f855689c65989b52f10af965fdea71c9c83", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.6 [INFO] [stderr] Compiling syn v1.0.11 [INFO] [stderr] Compiling serde v1.0.104 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Checking itoa v0.4.4 [INFO] [stderr] Checking unicode-width v0.1.7 [INFO] [stderr] Compiling escargot v0.4.0 [INFO] [stderr] Checking predicates-core v1.0.0 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Checking atty v0.2.13 [INFO] [stderr] Checking treeline v0.1.0 [INFO] [stderr] Checking normalize-line-endings v0.2.2 [INFO] [stderr] Checking float-cmp v0.5.3 [INFO] [stderr] Checking tempdir v0.3.7 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking clap v2.33.0 [INFO] [stderr] Checking predicates-tree v1.0.0 [INFO] [stderr] Checking predicates v1.0.2 [INFO] [stderr] Compiling quote v1.0.2 [INFO] [stderr] Checking single_source v0.1.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | const INCLUDE: &'static str = "INCLUDE"; [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | const SKIP: &'static str = "SKIP"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | const HIDE: &'static str = "HIDE"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:12:18 [INFO] [stdout] | [INFO] [stdout] 12 | const EXTERNAL: &'static str = "EXTERNAL"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 13 | const CHECK: &'static str = "CHECK"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | const EXTRA: &'static str = "EXTRA"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | const MODE: &'static str = "MODE"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | const CHANGE: &'static str = "CHANGE"; [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] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:65:54 [INFO] [stdout] | [INFO] [stdout] 65 | let input_path = Path::new(&input_file).parent().expect(&format!( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 66 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 67 | | input_file [INFO] [stdout] 68 | | )); [INFO] [stdout] | |______^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 65 ~ let input_path = Path::new(&input_file).parent().unwrap_or_else(|| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 66 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:69:49 [INFO] [stdout] | [INFO] [stdout] 69 | let mut input_file = File::open(input_file).expect(&format!( [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 70 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 71 | | input_file [INFO] [stdout] 72 | | )); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 69 ~ let mut input_file = File::open(input_file).unwrap_or_else(|_| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 70 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:87:54 [INFO] [stdout] | [INFO] [stdout] 87 | let input_path = Path::new(&input_file).parent().expect(&format!( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 88 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 89 | | input_file [INFO] [stdout] 90 | | )); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 87 ~ let input_path = Path::new(&input_file).parent().unwrap_or_else(|| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 88 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:92:49 [INFO] [stdout] | [INFO] [stdout] 92 | let mut input_file = File::open(input_file).expect(&format!( [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 93 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 94 | | input_file [INFO] [stdout] 95 | | )); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ let mut input_file = File::open(input_file).unwrap_or_else(|_| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 93 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:174:25 [INFO] [stdout] | [INFO] [stdout] 174 | / match (t.next(), input_path) { [INFO] [stdout] 175 | | (Some(external_file), Some(input_path)) => { [INFO] [stdout] 176 | | let path_to_external = input_path [INFO] [stdout] 177 | | .to_str() [INFO] [stdout] ... | [INFO] [stdout] 190 | | _ => (), [INFO] [stdout] 191 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 174 ~ if let (Some(external_file), Some(input_path)) = (t.next(), input_path) { [INFO] [stdout] 175 + let path_to_external = input_path [INFO] [stdout] 176 + .to_str() [INFO] [stdout] 177 + .expect("Failed to pass input path") [INFO] [stdout] 178 + .to_owned(); [INFO] [stdout] 179 + let path_to_external = [INFO] [stdout] 180 + format!("{}/{}", path_to_external, external_file); [INFO] [stdout] 181 + if let ModeState::Disabled = current_mode.state { [INFO] [stdout] 182 + match t.next() { [INFO] [stdout] 183 + Some(m) if m == current_mode.m.as_str() => (), [INFO] [stdout] 184 + _ => continue, [INFO] [stdout] 185 + } [INFO] [stdout] 186 + } [INFO] [stdout] 187 + output.push_str(&add_external(&path_to_external)); [INFO] [stdout] 188 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:261:12 [INFO] [stdout] | [INFO] [stdout] 261 | if !code || code && show && !extra { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!code || show && !extra` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:241:33 [INFO] [stdout] | [INFO] [stdout] 241 | ... &buffer, [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:280:34 [INFO] [stdout] | [INFO] [stdout] 280 | fn change(input: String, buffer: &String, from: usize, show_diff: bool) -> String { [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] 280 - fn change(input: String, buffer: &String, from: usize, show_diff: bool) -> String { [INFO] [stdout] 280 + fn change(input: String, buffer: &str, from: usize, show_diff: bool) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling serde_derive v1.0.104 [INFO] [stderr] Checking serde_json v1.0.44 [INFO] [stderr] Checking assert_cmd v0.11.1 [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | const INCLUDE: &'static str = "INCLUDE"; [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | const SKIP: &'static str = "SKIP"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | const HIDE: &'static str = "HIDE"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:12:18 [INFO] [stdout] | [INFO] [stdout] 12 | const EXTERNAL: &'static str = "EXTERNAL"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 13 | const CHECK: &'static str = "CHECK"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | const EXTRA: &'static str = "EXTRA"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | const MODE: &'static str = "MODE"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | const CHANGE: &'static str = "CHANGE"; [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/errors.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | cmd.args(&["code", "", "", "rust", "code"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["code", "", "", "rust", "code"]` [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] --> tests/errors.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | cmd.args(&["code", "isdbcibbcidbd/newkjnkn.md", "", "rust", "code"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["code", "isdbcibbcidbd/newkjnkn.md", "", "rust", "code"]` [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] --> tests/integration.rs:11:15 [INFO] [stdout] | [INFO] [stdout] 11 | .args(&["new", "doubler", "--lib"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["new", "doubler", "--lib"]` [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] --> tests/integration.rs:14:14 [INFO] [stdout] | [INFO] [stdout] 14 | cmd.args(&["code", &sample_test, "src/lib.rs", "rust", "code"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["code", &sample_test, "src/lib.rs", "rust", "code"]` [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] --> tests/integration.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | cmd.args(&["code", &sample_test, "src/lib.rs", "rust", "test"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["code", &sample_test, "src/lib.rs", "rust", "test"]` [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] --> tests/integration.rs:24:15 [INFO] [stdout] | [INFO] [stdout] 24 | .args(&["test"]) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `["test"]` [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: function call inside of `expect` [INFO] [stdout] --> src/main.rs:65:54 [INFO] [stdout] | [INFO] [stdout] 65 | let input_path = Path::new(&input_file).parent().expect(&format!( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 66 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 67 | | input_file [INFO] [stdout] 68 | | )); [INFO] [stdout] | |______^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 65 ~ let input_path = Path::new(&input_file).parent().unwrap_or_else(|| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 66 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:69:49 [INFO] [stdout] | [INFO] [stdout] 69 | let mut input_file = File::open(input_file).expect(&format!( [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 70 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 71 | | input_file [INFO] [stdout] 72 | | )); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 69 ~ let mut input_file = File::open(input_file).unwrap_or_else(|_| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 70 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:87:54 [INFO] [stdout] | [INFO] [stdout] 87 | let input_path = Path::new(&input_file).parent().expect(&format!( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 88 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 89 | | input_file [INFO] [stdout] 90 | | )); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 87 ~ let input_path = Path::new(&input_file).parent().unwrap_or_else(|| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 88 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:92:49 [INFO] [stdout] | [INFO] [stdout] 92 | let mut input_file = File::open(input_file).expect(&format!( [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 93 | | "Cannot find the markdown source at: {}", [INFO] [stdout] 94 | | input_file [INFO] [stdout] 95 | | )); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ let mut input_file = File::open(input_file).unwrap_or_else(|_| panic!("Cannot find the markdown source at: {}", [INFO] [stdout] 93 ~ input_file)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:174:25 [INFO] [stdout] | [INFO] [stdout] 174 | / match (t.next(), input_path) { [INFO] [stdout] 175 | | (Some(external_file), Some(input_path)) => { [INFO] [stdout] 176 | | let path_to_external = input_path [INFO] [stdout] 177 | | .to_str() [INFO] [stdout] ... | [INFO] [stdout] 190 | | _ => (), [INFO] [stdout] 191 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 174 ~ if let (Some(external_file), Some(input_path)) = (t.next(), input_path) { [INFO] [stdout] 175 + let path_to_external = input_path [INFO] [stdout] 176 + .to_str() [INFO] [stdout] 177 + .expect("Failed to pass input path") [INFO] [stdout] 178 + .to_owned(); [INFO] [stdout] 179 + let path_to_external = [INFO] [stdout] 180 + format!("{}/{}", path_to_external, external_file); [INFO] [stdout] 181 + if let ModeState::Disabled = current_mode.state { [INFO] [stdout] 182 + match t.next() { [INFO] [stdout] 183 + Some(m) if m == current_mode.m.as_str() => (), [INFO] [stdout] 184 + _ => continue, [INFO] [stdout] 185 + } [INFO] [stdout] 186 + } [INFO] [stdout] 187 + output.push_str(&add_external(&path_to_external)); [INFO] [stdout] 188 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:261:12 [INFO] [stdout] | [INFO] [stdout] 261 | if !code || code && show && !extra { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!code || show && !extra` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:241:33 [INFO] [stdout] | [INFO] [stdout] 241 | ... &buffer, [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:280:34 [INFO] [stdout] | [INFO] [stdout] 280 | fn change(input: String, buffer: &String, from: usize, show_diff: bool) -> String { [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] 280 - fn change(input: String, buffer: &String, from: usize, show_diff: bool) -> String { [INFO] [stdout] 280 + fn change(input: String, buffer: &str, from: usize, show_diff: bool) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.19s [INFO] running `Command { std: "docker" "inspect" "8c722ba37f3252ffd2faf08c7b6f2f855689c65989b52f10af965fdea71c9c83", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c722ba37f3252ffd2faf08c7b6f2f855689c65989b52f10af965fdea71c9c83", kill_on_drop: false }` [INFO] [stdout] 8c722ba37f3252ffd2faf08c7b6f2f855689c65989b52f10af965fdea71c9c83