[INFO] cloning repository https://github.com/if-loop69420/linkma [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/if-loop69420/linkma" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fif-loop69420%2Flinkma", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fif-loop69420%2Flinkma'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3f81b4254ee4fad1e9bd611f5c0a10a8de0d46dd [INFO] linting if-loop69420/linkma against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fif-loop69420%2Flinkma" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/if-loop69420/linkma [INFO] finished tweaking git repo https://github.com/if-loop69420/linkma [INFO] tweaked toml for git repo https://github.com/if-loop69420/linkma written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/if-loop69420/linkma 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/if-loop69420/linkma 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 trim-in-place v0.1.7 [INFO] [stderr] Downloaded pest_meta v2.8.0 [INFO] [stderr] Downloaded pest_derive v2.8.0 [INFO] [stderr] Downloaded pest_generator v2.8.0 [INFO] [stderr] Downloaded toml v0.8.22 [INFO] [stderr] Downloaded rust-ini v0.21.1 [INFO] [stderr] Downloaded config v0.15.11 [INFO] [stderr] Downloaded yaml-rust2 v0.10.1 [INFO] [stderr] Downloaded winnow v0.7.9 [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] d4f38adc37e472a9bac94b503b21c206e8a26ca0920b0c2349b5eb68b8e6e6b4 [INFO] running `Command { std: "docker" "start" "-a" "d4f38adc37e472a9bac94b503b21c206e8a26ca0920b0c2349b5eb68b8e6e6b4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d4f38adc37e472a9bac94b503b21c206e8a26ca0920b0c2349b5eb68b8e6e6b4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d4f38adc37e472a9bac94b503b21c206e8a26ca0920b0c2349b5eb68b8e6e6b4", kill_on_drop: false }` [INFO] [stdout] d4f38adc37e472a9bac94b503b21c206e8a26ca0920b0c2349b5eb68b8e6e6b4 [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] c55760cbb1845c8bc956272975ce50de9449c0473c94699c3a088b8977710bca [INFO] running `Command { std: "docker" "start" "-a" "c55760cbb1845c8bc956272975ce50de9449c0473c94699c3a088b8977710bca", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling crunchy v0.2.3 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Compiling ucd-trie v0.1.7 [INFO] [stderr] Checking hashbrown v0.15.3 [INFO] [stderr] Checking is_terminal_polyfill v1.70.1 [INFO] [stderr] Checking anstyle-query v1.1.2 [INFO] [stderr] Checking winnow v0.7.9 [INFO] [stderr] Checking anstyle v1.0.10 [INFO] [stderr] Checking anstyle-parse v0.2.6 [INFO] [stderr] Checking colorchoice v1.0.3 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Checking trim-in-place v0.1.7 [INFO] [stderr] Checking arraydeque v0.5.1 [INFO] [stderr] Checking unicode-segmentation v1.12.0 [INFO] [stderr] Checking pathdiff v0.2.3 [INFO] [stderr] Checking iana-time-zone v0.1.63 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking clap_builder v4.5.37 [INFO] [stderr] Checking convert_case v0.6.0 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking hashlink v0.10.0 [INFO] [stderr] Checking yaml-rust2 v0.10.1 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking const-random v0.1.18 [INFO] [stderr] Checking dlv-list v0.5.2 [INFO] [stderr] Checking ordered-multimap v0.7.3 [INFO] [stderr] Checking rust-ini v0.21.1 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Compiling clap_derive v4.5.32 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Compiling pest v2.8.0 [INFO] [stderr] Checking clap v4.5.37 [INFO] [stderr] Compiling pest_meta v2.8.0 [INFO] [stderr] Compiling pest_generator v2.8.0 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Compiling pest_derive v2.8.0 [INFO] [stderr] Checking serde_spanned v0.6.8 [INFO] [stderr] Checking toml_datetime v0.6.9 [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking json5 v0.4.1 [INFO] [stderr] Checking toml_edit v0.22.26 [INFO] [stderr] Checking ron v0.8.1 [INFO] [stderr] Checking toml v0.8.22 [INFO] [stderr] Checking config v0.15.11 [INFO] [stderr] Checking linkma v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `keep` [INFO] [stdout] --> src/main.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | keep, [INFO] [stdout] | ^^^^ help: try ignoring the field: `keep: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `switch_to_oldest` [INFO] [stdout] --> src/main.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | switch_to_oldest, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try ignoring the field: `switch_to_oldest: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `switch_to_newest` [INFO] [stdout] --> src/main.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | switch_to_newest, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try ignoring the field: `switch_to_newest: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `switch_to` [INFO] [stdout] --> src/main.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | Commands::Switch { switch_to } => { [INFO] [stdout] | ^^^^^^^^^ help: try ignoring the field: `switch_to: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CreateCommand` is never used [INFO] [stdout] --> src/create.rs:2:7 [INFO] [stdout] | [INFO] [stdout] 2 | trait CreateCommand { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `keep` [INFO] [stdout] --> src/main.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | keep, [INFO] [stdout] | ^^^^ help: try ignoring the field: `keep: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `switch_to_oldest` [INFO] [stdout] --> src/main.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | switch_to_oldest, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try ignoring the field: `switch_to_oldest: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `switch_to_newest` [INFO] [stdout] --> src/main.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | switch_to_newest, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try ignoring the field: `switch_to_newest: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `switch_to` [INFO] [stdout] --> src/main.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | Commands::Switch { switch_to } => { [INFO] [stdout] | ^^^^^^^^^ help: try ignoring the field: `switch_to: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CreateCommand` is never used [INFO] [stdout] --> src/create.rs:2:7 [INFO] [stdout] | [INFO] [stdout] 2 | trait CreateCommand { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/files.rs:19:11 [INFO] [stdout] | [INFO] [stdout] 19 | pub const TIMESTAMP: LazyCell> = LazyCell::new(|| SystemTime::now().into()); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `thread_local!` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/files.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | pub const DIRECTORY_REGEX: LazyCell = LazyCell::new(|| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `thread_local!` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | let timestamp_string = format!("{}", TIMESTAMP.clone().format("%d_%m_%Y-%H_%M")); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/files.rs:82:21 [INFO] [stdout] | [INFO] [stdout] 82 | return Err(format!("{}", e)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 82 - return Err(format!("{}", e)); [INFO] [stdout] 82 + Err(format!("{}", e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/files.rs:104:16 [INFO] [stdout] | [INFO] [stdout] 104 | if !read_link(output_path.clone()).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `read_link(output_path.clone()).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: function call inside of `expect` [INFO] [stdout] --> src/files.rs:98:14 [INFO] [stdout] | [INFO] [stdout] 98 | .expect(format!("Couldn't check that file exists!\n{}", output_path).as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldn't check that file exists!\n{}", output_path))` [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/files.rs:102:18 [INFO] [stdout] | [INFO] [stdout] 102 | .expect(format!("Couldn't open file for reading!\n{}", output_path).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldn't open file for reading!\n{}", output_path))` [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/files.rs:110:81 [INFO] [stdout] | [INFO] [stdout] 110 | let mut new_file = File::create(format!("{}.bak", output_path)).expect( [INFO] [stdout] | _________________________________________________________________________________^ [INFO] [stdout] 111 | | format!( [INFO] [stdout] 112 | | "Couldn't open file for backing up a file!\n{}.bak", [INFO] [stdout] 113 | | output_path [INFO] [stdout] 114 | | ) [INFO] [stdout] 115 | | .as_str(), [INFO] [stdout] 116 | | ); [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] 110 ~ let mut new_file = File::create(format!("{}.bak", output_path)).unwrap_or_else(|_| panic!("Couldn't open file for backing up a file!\n{}.bak", [INFO] [stdout] 111 ~ output_path)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/files.rs:118:77 [INFO] [stdout] | [INFO] [stdout] 118 | File::read_to_string(&mut old_file, &mut old_file_contents).expect( [INFO] [stdout] | _____________________________________________________________________________^ [INFO] [stdout] 119 | | format!( [INFO] [stdout] 120 | | "Couldn't read contents from old file{}", [INFO] [stdout] 121 | | output_path.clone(), [INFO] [stdout] 122 | | ) [INFO] [stdout] 123 | | .as_str(), [INFO] [stdout] 124 | | ); [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] 118 ~ File::read_to_string(&mut old_file, &mut old_file_contents).unwrap_or_else(|_| panic!("Couldn't read contents from old file{}", [INFO] [stdout] 119 ~ output_path.clone())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | TIMESTAMP.clone().format("%d_%m_%Y-%H_%M") [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:161:46 [INFO] [stdout] | [INFO] [stdout] 161 | let timestamp_string = format!("{}", TIMESTAMP.clone().format("%d_%m_%Y-%H_%M")); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:190:48 [INFO] [stdout] | [INFO] [stdout] 190 | let directory_path = format!("/linkma/{}", TIMESTAMP.clone().format("%d_%m_%Y-%H_%M")); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:218:21 [INFO] [stdout] | [INFO] [stdout] 218 | .filter(|x| DIRECTORY_REGEX.is_match(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | .filter(|x| DIRECTORY_REGEX.is_match(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/files.rs:19:11 [INFO] [stdout] | [INFO] [stdout] 19 | pub const TIMESTAMP: LazyCell> = LazyCell::new(|| SystemTime::now().into()); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `thread_local!` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: named constant with interior mutability [INFO] [stdout] --> src/files.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | pub const DIRECTORY_REGEX: LazyCell = LazyCell::new(|| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to make this a `thread_local!` item [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | let timestamp_string = format!("{}", TIMESTAMP.clone().format("%d_%m_%Y-%H_%M")); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/files.rs:82:21 [INFO] [stdout] | [INFO] [stdout] 82 | return Err(format!("{}", e)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 82 - return Err(format!("{}", e)); [INFO] [stdout] 82 + Err(format!("{}", e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/files.rs:104:16 [INFO] [stdout] | [INFO] [stdout] 104 | if !read_link(output_path.clone()).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `read_link(output_path.clone()).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: function call inside of `expect` [INFO] [stdout] --> src/files.rs:98:14 [INFO] [stdout] | [INFO] [stdout] 98 | .expect(format!("Couldn't check that file exists!\n{}", output_path).as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldn't check that file exists!\n{}", output_path))` [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/files.rs:102:18 [INFO] [stdout] | [INFO] [stdout] 102 | .expect(format!("Couldn't open file for reading!\n{}", output_path).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldn't open file for reading!\n{}", output_path))` [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/files.rs:110:81 [INFO] [stdout] | [INFO] [stdout] 110 | let mut new_file = File::create(format!("{}.bak", output_path)).expect( [INFO] [stdout] | _________________________________________________________________________________^ [INFO] [stdout] 111 | | format!( [INFO] [stdout] 112 | | "Couldn't open file for backing up a file!\n{}.bak", [INFO] [stdout] 113 | | output_path [INFO] [stdout] 114 | | ) [INFO] [stdout] 115 | | .as_str(), [INFO] [stdout] 116 | | ); [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] 110 ~ let mut new_file = File::create(format!("{}.bak", output_path)).unwrap_or_else(|_| panic!("Couldn't open file for backing up a file!\n{}.bak", [INFO] [stdout] 111 ~ output_path)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/files.rs:118:77 [INFO] [stdout] | [INFO] [stdout] 118 | File::read_to_string(&mut old_file, &mut old_file_contents).expect( [INFO] [stdout] | _____________________________________________________________________________^ [INFO] [stdout] 119 | | format!( [INFO] [stdout] 120 | | "Couldn't read contents from old file{}", [INFO] [stdout] 121 | | output_path.clone(), [INFO] [stdout] 122 | | ) [INFO] [stdout] 123 | | .as_str(), [INFO] [stdout] 124 | | ); [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] 118 ~ File::read_to_string(&mut old_file, &mut old_file_contents).unwrap_or_else(|_| panic!("Couldn't read contents from old file{}", [INFO] [stdout] 119 ~ output_path.clone())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | TIMESTAMP.clone().format("%d_%m_%Y-%H_%M") [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:161:46 [INFO] [stdout] | [INFO] [stdout] 161 | let timestamp_string = format!("{}", TIMESTAMP.clone().format("%d_%m_%Y-%H_%M")); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:190:48 [INFO] [stdout] | [INFO] [stdout] 190 | let directory_path = format!("/linkma/{}", TIMESTAMP.clone().format("%d_%m_%Y-%H_%M")); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:218:21 [INFO] [stdout] | [INFO] [stdout] 218 | .filter(|x| DIRECTORY_REGEX.is_match(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/files.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | .filter(|x| DIRECTORY_REGEX.is_match(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.82s [INFO] running `Command { std: "docker" "inspect" "c55760cbb1845c8bc956272975ce50de9449c0473c94699c3a088b8977710bca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c55760cbb1845c8bc956272975ce50de9449c0473c94699c3a088b8977710bca", kill_on_drop: false }` [INFO] [stdout] c55760cbb1845c8bc956272975ce50de9449c0473c94699c3a088b8977710bca