[INFO] cloning repository https://github.com/MalekLahbib/wget [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/MalekLahbib/wget" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMalekLahbib%2Fwget", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMalekLahbib%2Fwget'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4136b66627148693800680374bedae4637657979 [INFO] linting MalekLahbib/wget against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMalekLahbib%2Fwget" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/MalekLahbib/wget [INFO] finished tweaking git repo https://github.com/MalekLahbib/wget [INFO] tweaked toml for git repo https://github.com/MalekLahbib/wget written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/MalekLahbib/wget 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/MalekLahbib/wget 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] Downloading crates ... [INFO] [stderr] Downloaded async-task v4.5.0 [INFO] [stderr] Downloaded async-global-executor v2.4.0 [INFO] [stderr] Downloaded event-listener v4.0.0 [INFO] [stderr] Downloaded async-channel v2.1.1 [INFO] [stderr] Downloaded async-io v2.2.1 [INFO] [stderr] Downloaded async-lock v3.2.0 [INFO] [stderr] Downloaded futures-lite v2.1.0 [INFO] [stderr] Downloaded value-bag v1.4.2 [INFO] [stderr] Downloaded portable-atomic v1.5.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 4d6ec02f69a1ae9104f8e40770fcd42207d42b81464b5315f7f8717208608a7b [INFO] running `Command { std: "docker" "start" "-a" "4d6ec02f69a1ae9104f8e40770fcd42207d42b81464b5315f7f8717208608a7b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4d6ec02f69a1ae9104f8e40770fcd42207d42b81464b5315f7f8717208608a7b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4d6ec02f69a1ae9104f8e40770fcd42207d42b81464b5315f7f8717208608a7b", kill_on_drop: false }` [INFO] [stdout] 4d6ec02f69a1ae9104f8e40770fcd42207d42b81464b5315f7f8717208608a7b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 640a5be48a7d56f5953b4f6c85609d4bee6d1498a0fa7759b3b647378ae8d540 [INFO] running `Command { std: "docker" "start" "-a" "640a5be48a7d56f5953b4f6c85609d4bee6d1498a0fa7759b3b647378ae8d540", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.150 [INFO] [stderr] Checking futures-io v0.3.29 [INFO] [stderr] Compiling crossbeam-utils v0.8.16 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling pkg-config v0.3.27 [INFO] [stderr] Checking bytes v1.5.0 [INFO] [stderr] Checking value-bag v1.4.2 [INFO] [stderr] Checking fastrand v2.0.1 [INFO] [stderr] Checking log v0.4.20 [INFO] [stderr] Checking concurrent-queue v2.4.0 [INFO] [stderr] Checking itoa v1.0.9 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Compiling rustix v0.38.25 [INFO] [stderr] Compiling syn v2.0.39 [INFO] [stderr] Checking linux-raw-sys v0.4.11 [INFO] [stderr] Compiling openssl v0.10.60 [INFO] [stderr] Checking event-listener v4.0.0 [INFO] [stderr] Compiling futures-util v0.3.29 [INFO] [stderr] Checking http v0.2.11 [INFO] [stderr] Checking futures-lite v2.1.0 [INFO] [stderr] Checking socket2 v0.5.5 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking event-listener-strategy v0.4.0 [INFO] [stderr] Checking mio v0.8.9 [INFO] [stderr] Checking async-lock v3.2.0 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Checking tokio v1.34.0 [INFO] [stderr] Compiling native-tls v0.2.11 [INFO] [stderr] Compiling futures-channel v0.3.29 [INFO] [stderr] Checking indexmap v2.1.0 [INFO] [stderr] Compiling polling v2.8.0 [INFO] [stderr] Compiling rustix v0.37.27 [INFO] [stderr] Compiling serde v1.0.193 [INFO] [stderr] Checking async-task v4.5.0 [INFO] [stderr] Checking try-lock v0.2.4 [INFO] [stderr] Checking piper v0.2.1 [INFO] [stderr] Checking want v0.3.1 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking io-lifetimes v1.0.11 [INFO] [stderr] Checking http-body v0.4.5 [INFO] [stderr] Checking async-channel v2.1.1 [INFO] [stderr] Compiling openssl-sys v0.9.96 [INFO] [stderr] Compiling backtrace v0.3.69 [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Compiling async-io v1.13.0 [INFO] [stderr] Checking fastrand v1.9.0 [INFO] [stderr] Checking unicode-bidi v0.3.13 [INFO] [stderr] Checking waker-fn v1.1.1 [INFO] [stderr] Compiling portable-atomic v1.5.1 [INFO] [stderr] Checking gimli v0.28.1 [INFO] [stderr] Checking futures-lite v1.13.0 [INFO] [stderr] Checking idna v0.5.0 [INFO] [stderr] Checking miniz_oxide v0.7.1 [INFO] [stderr] Compiling error-chain v0.12.4 [INFO] [stderr] Checking blocking v1.5.1 [INFO] [stderr] Checking async-executor v1.8.0 [INFO] [stderr] Checking async-lock v2.8.0 [INFO] [stderr] Checking tokio-util v0.7.10 [INFO] [stderr] Checking object v0.32.1 [INFO] [stderr] Checking addr2line v0.21.0 [INFO] [stderr] Checking ryu v1.0.15 [INFO] [stderr] Checking h2 v0.3.22 [INFO] [stderr] Checking rustc-demangle v0.1.23 [INFO] [stderr] Checking unicode-width v0.1.11 [INFO] [stderr] Checking console v0.15.7 [INFO] [stderr] Checking polling v3.3.1 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking async-io v2.2.1 [INFO] [stderr] Checking url v2.5.0 [INFO] [stderr] Checking async-global-executor v2.4.0 [INFO] [stderr] Checking async-channel v1.9.0 [INFO] [stderr] Checking kv-log-macro v1.0.7 [INFO] [stderr] Checking iana-time-zone v0.1.58 [INFO] [stderr] Checking base64 v0.21.5 [INFO] [stderr] Checking chrono v0.4.31 [INFO] [stderr] Checking tempfile v3.8.1 [INFO] [stderr] Checking indicatif v0.17.7 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Compiling async-attributes v1.1.2 [INFO] [stderr] Checking async-std v1.12.0 [INFO] [stderr] Checking hyper v0.14.27 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.22 [INFO] [stderr] Checking wget v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::thread::sleep` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mirror.rs:31:20 [INFO] [stdout] | [INFO] [stdout] 31 | if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if !(!v.contains("src=") || reject && v.contains(&reject_value)) { [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if (!v.contains(&reject_value) || !reject) && v.contains("src=") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mirror.rs:31:42 [INFO] [stdout] | [INFO] [stdout] 31 | if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if v.contains("src=") && !(reject && v.contains(&reject_value)) { [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if v.contains("src=") && !reject || !v.contains(&reject_value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/mirror.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | let destf; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `destf` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 64 ~ [INFO] [stdout] 65 ~ let destf = if link.split("/").collect::>().len() > 1 { [INFO] [stdout] 66 | let res = link.split("/").collect::>(); [INFO] [stdout] 67 | let dir = format!("{}{}", path, res[0]); [INFO] [stdout] 68 | create_dir_all(dir).expect("unable to create directory"); [INFO] [stdout] 69 ~ format!("./{}{}/{}", path, res[0], res[1]) [INFO] [stdout] 70 | } else { [INFO] [stdout] 71 ~ format!("./{}/{}", path, link) [INFO] [stdout] 72 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / write!( [INFO] [stdout] 140 | | output_file, [INFO] [stdout] 141 | | "start at {}-{:02}-{:02} {:02}:{:02}:{:02}\n", [INFO] [stdout] 142 | | now.year(), [INFO] [stdout] ... | [INFO] [stdout] 147 | | now.second() [INFO] [stdout] 148 | | )?; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 139 ~ writeln!( [INFO] [stdout] 140 | output_file, [INFO] [stdout] 141 ~ "start at {}-{:02}-{:02} {:02}:{:02}:{:02}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::sleep` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:173:13 [INFO] [stdout] | [INFO] [stdout] 173 | write!(output_file, " status {status}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 173 - write!(output_file, " status {status}\n")?; [INFO] [stdout] 173 + writeln!(output_file, " status {status}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | / write!( [INFO] [stdout] 175 | | output_file, [INFO] [stdout] 176 | | "content size: {:?} [~{:.2}MB]\n", [INFO] [stdout] 177 | | total_size, [INFO] [stdout] 178 | | (total_size as f32) / 1000000.0 [INFO] [stdout] 179 | | )?; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 174 ~ writeln!( [INFO] [stdout] 175 | output_file, [INFO] [stdout] 176 ~ "content size: {:?} [~{:.2}MB]", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:180:13 [INFO] [stdout] | [INFO] [stdout] 180 | write!(output_file, "saving file to: {}\n", filename)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 180 - write!(output_file, "saving file to: {}\n", filename)?; [INFO] [stdout] 180 + writeln!(output_file, "saving file to: {}", filename)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:234:9 [INFO] [stdout] | [INFO] [stdout] 234 | write!(output_file, "Downloaded [{}]\n", url)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 234 - write!(output_file, "Downloaded [{}]\n", url)?; [INFO] [stdout] 234 + writeln!(output_file, "Downloaded [{}]", url)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mirror.rs:31:20 [INFO] [stdout] | [INFO] [stdout] 31 | if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if !(!v.contains("src=") || reject && v.contains(&reject_value)) { [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if (!v.contains(&reject_value) || !reject) && v.contains("src=") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mirror.rs:31:42 [INFO] [stdout] | [INFO] [stdout] 31 | if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if v.contains("src=") && !(reject && v.contains(&reject_value)) { [INFO] [stdout] | [INFO] [stdout] 31 - if v.contains("src=") && (!reject || (reject && !v.contains(&reject_value))) { [INFO] [stdout] 31 + if v.contains("src=") && !reject || !v.contains(&reject_value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/mirror.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | let destf; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `destf` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 64 ~ [INFO] [stdout] 65 ~ let destf = if link.split("/").collect::>().len() > 1 { [INFO] [stdout] 66 | let res = link.split("/").collect::>(); [INFO] [stdout] 67 | let dir = format!("{}{}", path, res[0]); [INFO] [stdout] 68 | create_dir_all(dir).expect("unable to create directory"); [INFO] [stdout] 69 ~ format!("./{}{}/{}", path, res[0], res[1]) [INFO] [stdout] 70 | } else { [INFO] [stdout] 71 ~ format!("./{}/{}", path, link) [INFO] [stdout] 72 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | / write!( [INFO] [stdout] 140 | | output_file, [INFO] [stdout] 141 | | "start at {}-{:02}-{:02} {:02}:{:02}:{:02}\n", [INFO] [stdout] 142 | | now.year(), [INFO] [stdout] ... | [INFO] [stdout] 147 | | now.second() [INFO] [stdout] 148 | | )?; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 139 ~ writeln!( [INFO] [stdout] 140 | output_file, [INFO] [stdout] 141 ~ "start at {}-{:02}-{:02} {:02}:{:02}:{:02}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:173:13 [INFO] [stdout] | [INFO] [stdout] 173 | write!(output_file, " status {status}\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 173 - write!(output_file, " status {status}\n")?; [INFO] [stdout] 173 + writeln!(output_file, " status {status}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | / write!( [INFO] [stdout] 175 | | output_file, [INFO] [stdout] 176 | | "content size: {:?} [~{:.2}MB]\n", [INFO] [stdout] 177 | | total_size, [INFO] [stdout] 178 | | (total_size as f32) / 1000000.0 [INFO] [stdout] 179 | | )?; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 174 ~ writeln!( [INFO] [stdout] 175 | output_file, [INFO] [stdout] 176 ~ "content size: {:?} [~{:.2}MB]", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:180:13 [INFO] [stdout] | [INFO] [stdout] 180 | write!(output_file, "saving file to: {}\n", filename)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 180 - write!(output_file, "saving file to: {}\n", filename)?; [INFO] [stdout] 180 + writeln!(output_file, "saving file to: {}", filename)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:234:9 [INFO] [stdout] | [INFO] [stdout] 234 | write!(output_file, "Downloaded [{}]\n", url)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 234 - write!(output_file, "Downloaded [{}]\n", url)?; [INFO] [stdout] 234 + writeln!(output_file, "Downloaded [{}]", url)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 59.02s [INFO] running `Command { std: "docker" "inspect" "640a5be48a7d56f5953b4f6c85609d4bee6d1498a0fa7759b3b647378ae8d540", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "640a5be48a7d56f5953b4f6c85609d4bee6d1498a0fa7759b3b647378ae8d540", kill_on_drop: false }` [INFO] [stdout] 640a5be48a7d56f5953b4f6c85609d4bee6d1498a0fa7759b3b647378ae8d540