[INFO] cloning repository https://github.com/PlacidFireball/csci460-homework3-rust-project [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/PlacidFireball/csci460-homework3-rust-project" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPlacidFireball%2Fcsci460-homework3-rust-project", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPlacidFireball%2Fcsci460-homework3-rust-project'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] eef4071802fc2b1f49475c3be70e1f8d4349a7b7 [INFO] linting PlacidFireball/csci460-homework3-rust-project against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPlacidFireball%2Fcsci460-homework3-rust-project" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/PlacidFireball/csci460-homework3-rust-project [INFO] finished tweaking git repo https://github.com/PlacidFireball/csci460-homework3-rust-project [INFO] tweaked toml for git repo https://github.com/PlacidFireball/csci460-homework3-rust-project written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/PlacidFireball/csci460-homework3-rust-project 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/PlacidFireball/csci460-homework3-rust-project 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] b27b4125da490b2b3b3962389a06ddf1640ba2c3a5ef856bc8cb7ff84367fb22 [INFO] running `Command { std: "docker" "start" "-a" "b27b4125da490b2b3b3962389a06ddf1640ba2c3a5ef856bc8cb7ff84367fb22", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b27b4125da490b2b3b3962389a06ddf1640ba2c3a5ef856bc8cb7ff84367fb22", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b27b4125da490b2b3b3962389a06ddf1640ba2c3a5ef856bc8cb7ff84367fb22", kill_on_drop: false }` [INFO] [stdout] b27b4125da490b2b3b3962389a06ddf1640ba2c3a5ef856bc8cb7ff84367fb22 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 6abfd59dee76650801138de3fedcc0687503f976e5c4094e36ffddaa4bdaa535 [INFO] running `Command { std: "docker" "start" "-a" "6abfd59dee76650801138de3fedcc0687503f976e5c4094e36ffddaa4bdaa535", kill_on_drop: false }` [INFO] [stderr] Checking csci460-homework3-rust-project v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | for i in 0..self.progress { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | for i in 0..self.progress { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:145:21 [INFO] [stdout] | [INFO] [stdout] 145 | for i in 0..self.progress { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | tmp.push_str("1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `tmp.push('1')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | tmp.push_str("N"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `tmp.push('N')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | tmp.push_str("3"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `tmp.push('3')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/main.rs:156:21 [INFO] [stdout] | [INFO] [stdout] 156 | time, id.to_string(), fmt_str, id.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/main.rs:156:46 [INFO] [stdout] | [INFO] [stdout] 156 | time, id.to_string(), fmt_str, id.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:268:28 [INFO] [stdout] | [INFO] [stdout] 268 | ... if last_running_job.ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(clone.is_started() || !clone.id.clone().eq(&"t3".to_string())) && last_running_job.ne(&"t1".to_string())` [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:268:70 [INFO] [stdout] | [INFO] [stdout] 268 | ...ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!clone.id.clone().eq(&"t3".to_string()) || clone.is_started()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:297:28 [INFO] [stdout] | [INFO] [stdout] 297 | ... if last_running_job.ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(clone.is_started() || !clone.id.clone().eq(&"t3".to_string())) && last_running_job.ne(&"t1".to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:297:70 [INFO] [stdout] | [INFO] [stdout] 297 | ...ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!clone.id.clone().eq(&"t3".to_string()) || clone.is_started()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:164:5 [INFO] [stdout] | [INFO] [stdout] 164 | / let mut ts: Vec = vec![]; // template jobs that we can clone from [INFO] [stdout] 165 | | ts.push(Job::init(3, String::from("t1"), 3, 0)); // T1 - uses shared buffer [INFO] [stdout] 166 | | ts.push(Job::init(2, String::from("t2"), 10, 0)); // T2 [INFO] [stdout] 167 | | ts.push(Job::init(1, String::from("t3"), 3, 0)); // T3 - uses shared buffer [INFO] [stdout] | |____________________________________________________^ help: consider using the `vec![]` macro: `let ts: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:185:37 [INFO] [stdout] | [INFO] [stdout] 185 | let mut file = match File::open(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `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] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `jobs` [INFO] [stdout] --> src/main.rs:212:18 [INFO] [stdout] | [INFO] [stdout] 212 | for i in 0..jobs.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 212 - for i in 0..jobs.len() { [INFO] [stdout] 212 + for in &jobs { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:265:24 [INFO] [stdout] | [INFO] [stdout] 265 | if last_running_job.ne("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_running_job.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | / if last_running_job.ne(&active_job_queue[highest_priority].id.clone()) { [INFO] [stdout] 294 | | if last_running_job.ne("") { [INFO] [stdout] 295 | | let pos: usize = active_job_queue.iter().position(|j| j.id.eq(&last_running_job)).unwrap(); [INFO] [stdout] 296 | | let clone = active_job_queue[pos].clone(); [INFO] [stdout] ... | [INFO] [stdout] 301 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 293 ~ if last_running_job.ne(&active_job_queue[highest_priority].id.clone()) [INFO] [stdout] 294 ~ && last_running_job.ne("") { [INFO] [stdout] 295 | let pos: usize = active_job_queue.iter().position(|j| j.id.eq(&last_running_job)).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 299 | } [INFO] [stdout] 300 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:294:24 [INFO] [stdout] | [INFO] [stdout] 294 | if last_running_job.ne("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_running_job.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:306:53 [INFO] [stdout] | [INFO] [stdout] 306 | most_recent_time, owner_id, "NNNNNNNNNN", owner_id [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 305 ~ "time {}: {} NNNNNNNNNN {}", [INFO] [stdout] 306 ~ most_recent_time, owner_id, owner_id [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:131:21 [INFO] [stdout] | [INFO] [stdout] 131 | for i in 0..self.progress { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | for i in 0..self.progress { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:145:21 [INFO] [stdout] | [INFO] [stdout] 145 | for i in 0..self.progress { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | tmp.push_str("1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `tmp.push('1')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | tmp.push_str("N"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `tmp.push('N')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | tmp.push_str("3"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `tmp.push('3')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/main.rs:156:21 [INFO] [stdout] | [INFO] [stdout] 156 | time, id.to_string(), fmt_str, id.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/main.rs:156:46 [INFO] [stdout] | [INFO] [stdout] 156 | time, id.to_string(), fmt_str, id.to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:268:28 [INFO] [stdout] | [INFO] [stdout] 268 | ... if last_running_job.ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(clone.is_started() || !clone.id.clone().eq(&"t3".to_string())) && last_running_job.ne(&"t1".to_string())` [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:268:70 [INFO] [stdout] | [INFO] [stdout] 268 | ...ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!clone.id.clone().eq(&"t3".to_string()) || clone.is_started()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:297:28 [INFO] [stdout] | [INFO] [stdout] 297 | ... if last_running_job.ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(clone.is_started() || !clone.id.clone().eq(&"t3".to_string())) && last_running_job.ne(&"t1".to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:297:70 [INFO] [stdout] | [INFO] [stdout] 297 | ...ne(&"t1".to_string()) && !(clone.id.clone().eq(&"t3".to_string()) && !clone.is_started()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!clone.id.clone().eq(&"t3".to_string()) || clone.is_started()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:164:5 [INFO] [stdout] | [INFO] [stdout] 164 | / let mut ts: Vec = vec![]; // template jobs that we can clone from [INFO] [stdout] 165 | | ts.push(Job::init(3, String::from("t1"), 3, 0)); // T1 - uses shared buffer [INFO] [stdout] 166 | | ts.push(Job::init(2, String::from("t2"), 10, 0)); // T2 [INFO] [stdout] 167 | | ts.push(Job::init(1, String::from("t3"), 3, 0)); // T3 - uses shared buffer [INFO] [stdout] | |____________________________________________________^ help: consider using the `vec![]` macro: `let ts: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:185:37 [INFO] [stdout] | [INFO] [stdout] 185 | let mut file = match File::open(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `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] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `jobs` [INFO] [stdout] --> src/main.rs:212:18 [INFO] [stdout] | [INFO] [stdout] 212 | for i in 0..jobs.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 212 - for i in 0..jobs.len() { [INFO] [stdout] 212 + for in &jobs { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:265:24 [INFO] [stdout] | [INFO] [stdout] 265 | if last_running_job.ne("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_running_job.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | / if last_running_job.ne(&active_job_queue[highest_priority].id.clone()) { [INFO] [stdout] 294 | | if last_running_job.ne("") { [INFO] [stdout] 295 | | let pos: usize = active_job_queue.iter().position(|j| j.id.eq(&last_running_job)).unwrap(); [INFO] [stdout] 296 | | let clone = active_job_queue[pos].clone(); [INFO] [stdout] ... | [INFO] [stdout] 301 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 293 ~ if last_running_job.ne(&active_job_queue[highest_priority].id.clone()) [INFO] [stdout] 294 ~ && last_running_job.ne("") { [INFO] [stdout] 295 | let pos: usize = active_job_queue.iter().position(|j| j.id.eq(&last_running_job)).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 299 | } [INFO] [stdout] 300 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:294:24 [INFO] [stdout] | [INFO] [stdout] 294 | if last_running_job.ne("") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_running_job.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:306:53 [INFO] [stdout] | [INFO] [stdout] 306 | most_recent_time, owner_id, "NNNNNNNNNN", owner_id [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 305 ~ "time {}: {} NNNNNNNNNN {}", [INFO] [stdout] 306 ~ most_recent_time, owner_id, owner_id [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.33s [INFO] running `Command { std: "docker" "inspect" "6abfd59dee76650801138de3fedcc0687503f976e5c4094e36ffddaa4bdaa535", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6abfd59dee76650801138de3fedcc0687503f976e5c4094e36ffddaa4bdaa535", kill_on_drop: false }` [INFO] [stdout] 6abfd59dee76650801138de3fedcc0687503f976e5c4094e36ffddaa4bdaa535