[INFO] cloning repository https://github.com/wade-cheng/rlsh [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/wade-cheng/rlsh" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwade-cheng%2Frlsh", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwade-cheng%2Frlsh'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d17652bf944051efd9cf5a37e3ecf2f96d8cfcef [INFO] linting wade-cheng/rlsh against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwade-cheng%2Frlsh" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/wade-cheng/rlsh [INFO] finished tweaking git repo https://github.com/wade-cheng/rlsh [INFO] tweaked toml for git repo https://github.com/wade-cheng/rlsh written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/wade-cheng/rlsh 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/wade-cheng/rlsh 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-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 3df457a637f69de5d899e64bdfb5a584d34d5c0d660e54d780b3dafeb7e45e65 [INFO] running `Command { std: "docker" "start" "-a" "3df457a637f69de5d899e64bdfb5a584d34d5c0d660e54d780b3dafeb7e45e65", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3df457a637f69de5d899e64bdfb5a584d34d5c0d660e54d780b3dafeb7e45e65", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3df457a637f69de5d899e64bdfb5a584d34d5c0d660e54d780b3dafeb7e45e65", kill_on_drop: false }` [INFO] [stdout] 3df457a637f69de5d899e64bdfb5a584d34d5c0d660e54d780b3dafeb7e45e65 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 8a68592194c908cfab2f341feb29142913a32bd58a62543d0fb6118405bd2fb6 [INFO] running `Command { std: "docker" "start" "-a" "8a68592194c908cfab2f341feb29142913a32bd58a62543d0fb6118405bd2fb6", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking whoami v1.6.0 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking rmp v0.8.14 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Checking tokio v1.45.1 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking rmp-serde v1.3.0 [INFO] [stderr] Checking rlsh v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/game/mod.rs:14:30 [INFO] [stdout] | [INFO] [stdout] 14 | pub const LOCKED_DOOR_ICON: &'static str = "󱂯"; [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/game/mod.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | pub const UNLOCKED_DOOR_ICON: &'static str = "󰠛"; [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/game/mod.rs:16:25 [INFO] [stdout] | [INFO] [stdout] 16 | pub const PERSON_ICON: &'static str = ""; [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/game/mod.rs:14:30 [INFO] [stdout] | [INFO] [stdout] 14 | pub const LOCKED_DOOR_ICON: &'static str = "󱂯"; [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/game/mod.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | pub const UNLOCKED_DOOR_ICON: &'static str = "󰠛"; [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/game/mod.rs:16:25 [INFO] [stdout] | [INFO] [stdout] 16 | pub const PERSON_ICON: &'static str = ""; [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: unused variable: `token` [INFO] [stdout] --> src/game/parser.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn insert(self, token: T, phrase: &str) -> Self { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_token` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `phrase` [INFO] [stdout] --> src/game/parser.rs:88:35 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn insert(self, token: T, phrase: &str) -> Self { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_phrase` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/game/parser.rs:125:23 [INFO] [stdout] | [INFO] [stdout] 125 | pub fn get(&self, input: &str) -> Option<(T, Vec)> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `action` [INFO] [stdout] --> src/game/mod.rs:48:19 [INFO] [stdout] | [INFO] [stdout] 48 | fn act(&self, action: Action) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_action` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/game/mod.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | let f = fs::read_to_string(get_data_path()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `token` [INFO] [stdout] --> src/game/parser.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn insert(self, token: T, phrase: &str) -> Self { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_token` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `phrase` [INFO] [stdout] --> src/game/parser.rs:88:35 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn insert(self, token: T, phrase: &str) -> Self { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_phrase` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/game/parser.rs:125:23 [INFO] [stdout] | [INFO] [stdout] 125 | pub fn get(&self, input: &str) -> Option<(T, Vec)> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `action` [INFO] [stdout] --> src/game/mod.rs:48:19 [INFO] [stdout] | [INFO] [stdout] 48 | fn act(&self, action: Action) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_action` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/game/mod.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | let f = fs::read_to_string(get_data_path()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config` is never constructed [INFO] [stdout] --> src/game/mod.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | struct Config { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Action` is never used [INFO] [stdout] --> src/game/mod.rs:24:6 [INFO] [stdout] | [INFO] [stdout] 24 | enum Action { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `act` is never used [INFO] [stdout] --> src/game/mod.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 47 | impl Entity { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 48 | fn act(&self, action: Action) {} [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `todo` is never read [INFO] [stdout] --> src/game/parser.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct Parser { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 23 | todo: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_state` and `get_pid` are never used [INFO] [stdout] --> src/shell/job_list.rs:117:12 [INFO] [stdout] | [INFO] [stdout] 39 | impl JobList { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn get_state(&self, jid: usize) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 126 | pub fn get_pid(&self, jid: usize) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Parser` [INFO] [stdout] --> src/game/parser.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / pub fn new() -> Parser { [INFO] [stdout] 42 | | todo!() [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for Parser { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config` is never constructed [INFO] [stdout] --> src/game/mod.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | struct Config { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Action` is never used [INFO] [stdout] --> src/game/mod.rs:24:6 [INFO] [stdout] | [INFO] [stdout] 24 | enum Action { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `act` is never used [INFO] [stdout] --> src/game/mod.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 47 | impl Entity { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 48 | fn act(&self, action: Action) {} [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `todo` is never read [INFO] [stdout] --> src/game/parser.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct Parser { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 23 | todo: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Parser` [INFO] [stdout] --> src/game/parser.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / pub fn new() -> Parser { [INFO] [stdout] 42 | | todo!() [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for Parser { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/game/mod.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | contents.extend(Vec::from(e).into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 67 - contents.extend(Vec::from(e).into_iter()); [INFO] [stdout] 67 + contents.extend(Vec::from(e)); [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/game/mod.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | / match c { [INFO] [stdout] 99 | | Component::TakesDamage(hp) => { [INFO] [stdout] 100 | | fs::remove_file(&abs_path)?; [INFO] [stdout] 101 | | println!("the dude has {} hp.", hp); [INFO] [stdout] ... | [INFO] [stdout] 129 | | _ => (), [INFO] [stdout] 130 | | } [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] 98 ~ if let Component::TakesDamage(hp) = c { [INFO] [stdout] 99 + fs::remove_file(&abs_path)?; [INFO] [stdout] 100 + println!("the dude has {} hp.", hp); [INFO] [stdout] 101 + let damage = rand::random_range(1..4); [INFO] [stdout] 102 + let new_hp = hp - damage; [INFO] [stdout] 103 + if new_hp <= 0 { [INFO] [stdout] 104 + println!("you punched him so hard he died. yikes."); [INFO] [stdout] 105 + return Ok(()); [INFO] [stdout] 106 + } [INFO] [stdout] 107 + println!( [INFO] [stdout] 108 + "you punched him with some amount of force, knocking out about {} teeth.", [INFO] [stdout] 109 + damage [INFO] [stdout] 110 + ); [INFO] [stdout] 111 + println!("the poor sod only has {} left.", new_hp); [INFO] [stdout] 112 + spawn( [INFO] [stdout] 113 + Entity { [INFO] [stdout] 114 + components: e [INFO] [stdout] 115 + .components [INFO] [stdout] 116 + .clone() [INFO] [stdout] 117 + .into_iter() [INFO] [stdout] 118 + .filter(|c| { [INFO] [stdout] 119 + std::mem::discriminant(c) [INFO] [stdout] 120 + != std::mem::discriminant(&Component::TakesDamage(0)) [INFO] [stdout] 121 + }) [INFO] [stdout] 122 + .chain([Component::TakesDamage(new_hp)].into_iter()) [INFO] [stdout] 123 + .collect(), [INFO] [stdout] 124 + }, [INFO] [stdout] 125 + &abs_path, [INFO] [stdout] 126 + ); [INFO] [stdout] 127 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/game/mod.rs:123:36 [INFO] [stdout] | [INFO] [stdout] 123 | ... .chain([Component::TakesDamage(new_hp)].into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 123 - .chain([Component::TakesDamage(new_hp)].into_iter()) [INFO] [stdout] 123 + .chain([Component::TakesDamage(new_hp)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/shell/job_list.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(_) = job_list.fg_job { [INFO] [stdout] | -------^^^^^^^------------------ help: try: `if job_list.fg_job.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/shell/job_list.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | if let Some(_) = job_list.jobs.insert(jid, job) { [INFO] [stdout] | -------^^^^^^^--------------------------------- help: try: `if job_list.jobs.insert(jid, job).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/shell/job_list.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | / if let Some(id) = job_list.max_jid { [INFO] [stdout] 97 | | if jid == id { [INFO] [stdout] 98 | | job_list.max_jid = match job_list.jobs.keys().reduce(cmp::max) { [INFO] [stdout] 99 | | Some(x) => Some(*x), [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] 96 ~ if let Some(id) = job_list.max_jid [INFO] [stdout] 97 ~ && jid == id { [INFO] [stdout] 98 | job_list.max_jid = match job_list.jobs.keys().reduce(cmp::max) { [INFO] [stdout] ... [INFO] [stdout] 101 | }; [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/shell/job_list.rs:98:36 [INFO] [stdout] | [INFO] [stdout] 98 | job_list.max_jid = match job_list.jobs.keys().reduce(cmp::max) { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 99 | | Some(x) => Some(*x), [INFO] [stdout] 100 | | None => None, [INFO] [stdout] 101 | | }; [INFO] [stdout] | |_________________^ help: try: `job_list.jobs.keys().reduce(cmp::max).map(|x| *x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/shell/job_list.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | / if let Some(id) = job_list.fg_job { [INFO] [stdout] 107 | | if id == jid { [INFO] [stdout] 108 | | job_list.fg_job = None [INFO] [stdout] 109 | | } [INFO] [stdout] 110 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 106 ~ if let Some(id) = job_list.fg_job [INFO] [stdout] 107 ~ && id == jid { [INFO] [stdout] 108 | job_list.fg_job = None [INFO] [stdout] 109 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/shell/mod.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | return true; [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] 111 - return true; [INFO] [stdout] 111 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/shell/mod.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | if let Err(_) = game::attack(&s) { [INFO] [stdout] | -------^^^^^^------------------- help: try: `if game::attack(&s).is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/shell/mod.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | if data.files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `data.files.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/shell/mod.rs:166:17 [INFO] [stdout] | [INFO] [stdout] 166 | / if !data.all { [INFO] [stdout] 167 | | if let Some('.') = file [INFO] [stdout] 168 | | .path() [INFO] [stdout] 169 | | .file_name() [INFO] [stdout] ... | [INFO] [stdout] 178 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 166 ~ if !data.all [INFO] [stdout] 167 ~ && let Some('.') = file [INFO] [stdout] 168 | .path() [INFO] [stdout] ... [INFO] [stdout] 176 | continue; [INFO] [stdout] 177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/shell/mod.rs:180:47 [INFO] [stdout] | [INFO] [stdout] 180 | let (prefix, suffix) = if let None = data.outfile { [INFO] [stdout] | -------^^^^--------------- help: try: `if data.outfile.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/game/mod.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | contents.extend(Vec::from(e).into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 67 - contents.extend(Vec::from(e).into_iter()); [INFO] [stdout] 67 + contents.extend(Vec::from(e)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/shell/mod.rs:183:35 [INFO] [stdout] | [INFO] [stdout] 183 | } else if let Ok(_) = game::get_entity(file.path()) { [INFO] [stdout] | -------^^^^^-------------------------------- help: try: `if game::get_entity(file.path()).is_ok()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/shell/mod.rs:201:21 [INFO] [stdout] | [INFO] [stdout] 201 | write!(outfile, "\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] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 201 - write!(outfile, "\n")?; [INFO] [stdout] 201 + writeln!(outfile)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/shell/mod.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | writeln!(outfile, "")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/shell/mod.rs:214:13 [INFO] [stdout] | [INFO] [stdout] 214 | writeln!(outfile, "")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [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/game/mod.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | / match c { [INFO] [stdout] 99 | | Component::TakesDamage(hp) => { [INFO] [stdout] 100 | | fs::remove_file(&abs_path)?; [INFO] [stdout] 101 | | println!("the dude has {} hp.", hp); [INFO] [stdout] ... | [INFO] [stdout] 129 | | _ => (), [INFO] [stdout] 130 | | } [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] 98 ~ if let Component::TakesDamage(hp) = c { [INFO] [stdout] 99 + fs::remove_file(&abs_path)?; [INFO] [stdout] 100 + println!("the dude has {} hp.", hp); [INFO] [stdout] 101 + let damage = rand::random_range(1..4); [INFO] [stdout] 102 + let new_hp = hp - damage; [INFO] [stdout] 103 + if new_hp <= 0 { [INFO] [stdout] 104 + println!("you punched him so hard he died. yikes."); [INFO] [stdout] 105 + return Ok(()); [INFO] [stdout] 106 + } [INFO] [stdout] 107 + println!( [INFO] [stdout] 108 + "you punched him with some amount of force, knocking out about {} teeth.", [INFO] [stdout] 109 + damage [INFO] [stdout] 110 + ); [INFO] [stdout] 111 + println!("the poor sod only has {} left.", new_hp); [INFO] [stdout] 112 + spawn( [INFO] [stdout] 113 + Entity { [INFO] [stdout] 114 + components: e [INFO] [stdout] 115 + .components [INFO] [stdout] 116 + .clone() [INFO] [stdout] 117 + .into_iter() [INFO] [stdout] 118 + .filter(|c| { [INFO] [stdout] 119 + std::mem::discriminant(c) [INFO] [stdout] 120 + != std::mem::discriminant(&Component::TakesDamage(0)) [INFO] [stdout] 121 + }) [INFO] [stdout] 122 + .chain([Component::TakesDamage(new_hp)].into_iter()) [INFO] [stdout] 123 + .collect(), [INFO] [stdout] 124 + }, [INFO] [stdout] 125 + &abs_path, [INFO] [stdout] 126 + ); [INFO] [stdout] 127 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/game/mod.rs:123:36 [INFO] [stdout] | [INFO] [stdout] 123 | ... .chain([Component::TakesDamage(new_hp)].into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 123 - .chain([Component::TakesDamage(new_hp)].into_iter()) [INFO] [stdout] 123 + .chain([Component::TakesDamage(new_hp)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/shell/job_list.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(_) = job_list.fg_job { [INFO] [stdout] | -------^^^^^^^------------------ help: try: `if job_list.fg_job.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/shell/mod.rs:294:69 [INFO] [stdout] | [INFO] [stdout] 294 | ... let cmdline = job_list.get_cmdline(jid).unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/shell/job_list.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | if let Some(_) = job_list.jobs.insert(jid, job) { [INFO] [stdout] | -------^^^^^^^--------------------------------- help: try: `if job_list.jobs.insert(jid, job).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/shell/job_list.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | / if let Some(id) = job_list.max_jid { [INFO] [stdout] 97 | | if jid == id { [INFO] [stdout] 98 | | job_list.max_jid = match job_list.jobs.keys().reduce(cmp::max) { [INFO] [stdout] 99 | | Some(x) => Some(*x), [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] 96 ~ if let Some(id) = job_list.max_jid [INFO] [stdout] 97 ~ && jid == id { [INFO] [stdout] 98 | job_list.max_jid = match job_list.jobs.keys().reduce(cmp::max) { [INFO] [stdout] ... [INFO] [stdout] 101 | }; [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/shell/job_list.rs:98:36 [INFO] [stdout] | [INFO] [stdout] 98 | job_list.max_jid = match job_list.jobs.keys().reduce(cmp::max) { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 99 | | Some(x) => Some(*x), [INFO] [stdout] 100 | | None => None, [INFO] [stdout] 101 | | }; [INFO] [stdout] | |_________________^ help: try: `job_list.jobs.keys().reduce(cmp::max).map(|x| *x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/shell/job_list.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | / if let Some(id) = job_list.fg_job { [INFO] [stdout] 107 | | if id == jid { [INFO] [stdout] 108 | | job_list.fg_job = None [INFO] [stdout] 109 | | } [INFO] [stdout] 110 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 106 ~ if let Some(id) = job_list.fg_job [INFO] [stdout] 107 ~ && id == jid { [INFO] [stdout] 108 | job_list.fg_job = None [INFO] [stdout] 109 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `App` [INFO] [stdout] --> src/shell/mod.rs:321:5 [INFO] [stdout] | [INFO] [stdout] 321 | / pub fn new() -> Self { [INFO] [stdout] 322 | | App [INFO] [stdout] 323 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 320 + impl Default for App { [INFO] [stdout] 321 + fn default() -> Self { [INFO] [stdout] 322 + Self::new() [INFO] [stdout] 323 + } [INFO] [stdout] 324 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/shell/mod.rs:374:33 [INFO] [stdout] | [INFO] [stdout] 374 | if let Some(&"spawn") = input.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/shell/mod.rs:375:52 [INFO] [stdout] | [INFO] [stdout] 375 | return Executable::TempDebugSpawnEnemy(String::from( [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 376 | | input.get(1..).unwrap_or(&["goblin"]).join(" "), [INFO] [stdout] 377 | | )); [INFO] [stdout] | |_____________^ help: consider removing `String::from()`: `input.get(1..).unwrap_or(&["goblin"]).join(" ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/shell/mod.rs:380:34 [INFO] [stdout] | [INFO] [stdout] 380 | if let Some(&"attack") = input.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/shell/mod.rs:381:53 [INFO] [stdout] | [INFO] [stdout] 381 | return Executable::TempDebugAttackEnemy(String::from( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 382 | | input.get(1..).unwrap_or(&["goblin"]).join(" "), [INFO] [stdout] 383 | | )); [INFO] [stdout] | |_____________^ help: consider removing `String::from()`: `input.get(1..).unwrap_or(&["goblin"]).join(" ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/shell/job_list.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | assert_eq!(false, list.delete(3)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 220 - assert_eq!(false, list.delete(3)); [INFO] [stdout] 220 + assert!(!list.delete(3)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/shell/job_list.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | assert_eq!(true, list.delete(1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 221 - assert_eq!(true, list.delete(1)); [INFO] [stdout] 221 + assert!(list.delete(1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/shell/mod.rs:415:12 [INFO] [stdout] | [INFO] [stdout] 415 | if input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/shell/mod.rs:428:36 [INFO] [stdout] | [INFO] [stdout] 428 | Executable::Cd(input.get(0).map(|v| v.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/shell/job_list.rs:224:9 [INFO] [stdout] | [INFO] [stdout] 224 | assert_eq!(true, list.delete(3)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 224 - assert_eq!(true, list.delete(3)); [INFO] [stdout] 224 + assert!(list.delete(3)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/shell/job_list.rs:226:9 [INFO] [stdout] | [INFO] [stdout] 226 | assert_eq!(true, list.delete(2)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 226 - assert_eq!(true, list.delete(2)); [INFO] [stdout] 226 + assert!(list.delete(2)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/shell/mod.rs:482:40 [INFO] [stdout] | [INFO] [stdout] 482 | arg_list.retain(|word| !(*word == "-l")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*word != "-l")` [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: unneeded `return` statement [INFO] [stdout] --> src/shell/mod.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | return true; [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] 111 - return true; [INFO] [stdout] 111 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/shell/mod.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | if let Err(_) = game::attack(&s) { [INFO] [stdout] | -------^^^^^^------------------- help: try: `if game::attack(&s).is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/shell/mod.rs:492:40 [INFO] [stdout] | [INFO] [stdout] 492 | arg_list.retain(|word| !(*word == "-t")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*word != "-t")` [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: length comparison to zero [INFO] [stdout] --> src/shell/mod.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | if data.files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `data.files.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/shell/mod.rs:166:17 [INFO] [stdout] | [INFO] [stdout] 166 | / if !data.all { [INFO] [stdout] 167 | | if let Some('.') = file [INFO] [stdout] 168 | | .path() [INFO] [stdout] 169 | | .file_name() [INFO] [stdout] ... | [INFO] [stdout] 178 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 166 ~ if !data.all [INFO] [stdout] 167 ~ && let Some('.') = file [INFO] [stdout] 168 | .path() [INFO] [stdout] ... [INFO] [stdout] 176 | continue; [INFO] [stdout] 177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/shell/mod.rs:180:47 [INFO] [stdout] | [INFO] [stdout] 180 | let (prefix, suffix) = if let None = data.outfile { [INFO] [stdout] | -------^^^^--------------- help: try: `if data.outfile.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/shell/mod.rs:183:35 [INFO] [stdout] | [INFO] [stdout] 183 | } else if let Ok(_) = game::get_entity(file.path()) { [INFO] [stdout] | -------^^^^^-------------------------------- help: try: `if game::get_entity(file.path()).is_ok()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/shell/mod.rs:201:21 [INFO] [stdout] | [INFO] [stdout] 201 | write!(outfile, "\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] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 201 - write!(outfile, "\n")?; [INFO] [stdout] 201 + writeln!(outfile)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/shell/mod.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | writeln!(outfile, "")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/shell/mod.rs:214:13 [INFO] [stdout] | [INFO] [stdout] 214 | writeln!(outfile, "")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/shell/mod.rs:294:69 [INFO] [stdout] | [INFO] [stdout] 294 | ... let cmdline = job_list.get_cmdline(jid).unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `App` [INFO] [stdout] --> src/shell/mod.rs:321:5 [INFO] [stdout] | [INFO] [stdout] 321 | / pub fn new() -> Self { [INFO] [stdout] 322 | | App [INFO] [stdout] 323 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 320 + impl Default for App { [INFO] [stdout] 321 + fn default() -> Self { [INFO] [stdout] 322 + Self::new() [INFO] [stdout] 323 + } [INFO] [stdout] 324 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/shell/mod.rs:374:33 [INFO] [stdout] | [INFO] [stdout] 374 | if let Some(&"spawn") = input.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/shell/mod.rs:375:52 [INFO] [stdout] | [INFO] [stdout] 375 | return Executable::TempDebugSpawnEnemy(String::from( [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 376 | | input.get(1..).unwrap_or(&["goblin"]).join(" "), [INFO] [stdout] 377 | | )); [INFO] [stdout] | |_____________^ help: consider removing `String::from()`: `input.get(1..).unwrap_or(&["goblin"]).join(" ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/shell/mod.rs:380:34 [INFO] [stdout] | [INFO] [stdout] 380 | if let Some(&"attack") = input.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/shell/mod.rs:381:53 [INFO] [stdout] | [INFO] [stdout] 381 | return Executable::TempDebugAttackEnemy(String::from( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 382 | | input.get(1..).unwrap_or(&["goblin"]).join(" "), [INFO] [stdout] 383 | | )); [INFO] [stdout] | |_____________^ help: consider removing `String::from()`: `input.get(1..).unwrap_or(&["goblin"]).join(" ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/shell/mod.rs:415:12 [INFO] [stdout] | [INFO] [stdout] 415 | if input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/shell/mod.rs:428:36 [INFO] [stdout] | [INFO] [stdout] 428 | Executable::Cd(input.get(0).map(|v| v.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/shell/mod.rs:482:40 [INFO] [stdout] | [INFO] [stdout] 482 | arg_list.retain(|word| !(*word == "-l")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*word != "-l")` [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/shell/mod.rs:492:40 [INFO] [stdout] | [INFO] [stdout] 492 | arg_list.retain(|word| !(*word == "-t")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*word != "-t")` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 18.70s [INFO] running `Command { std: "docker" "inspect" "8a68592194c908cfab2f341feb29142913a32bd58a62543d0fb6118405bd2fb6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8a68592194c908cfab2f341feb29142913a32bd58a62543d0fb6118405bd2fb6", kill_on_drop: false }` [INFO] [stdout] 8a68592194c908cfab2f341feb29142913a32bd58a62543d0fb6118405bd2fb6