[INFO] updating cached repository hgallagher1993/Calculator [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/hgallagher1993/Calculator [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/hgallagher1993/Calculator" "work/ex/clippy-test-run/sources/stable/gh/hgallagher1993/Calculator"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/hgallagher1993/Calculator'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/hgallagher1993/Calculator" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/hgallagher1993/Calculator"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/hgallagher1993/Calculator'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] d9a503417e94bb8d5beef654147b5cf798d55c40 [INFO] sha for GitHub repo hgallagher1993/Calculator: d9a503417e94bb8d5beef654147b5cf798d55c40 [INFO] validating manifest of hgallagher1993/Calculator on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of hgallagher1993/Calculator on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing hgallagher1993/Calculator [INFO] finished frobbing hgallagher1993/Calculator [INFO] frobbed toml for hgallagher1993/Calculator written to work/ex/clippy-test-run/sources/stable/gh/hgallagher1993/Calculator/Cargo.toml [INFO] started frobbing hgallagher1993/Calculator [INFO] finished frobbing hgallagher1993/Calculator [INFO] frobbed toml for hgallagher1993/Calculator written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/hgallagher1993/Calculator/Cargo.toml [INFO] crate hgallagher1993/Calculator has a lockfile. skipping [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting hgallagher1993/Calculator against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/hgallagher1993/Calculator:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 7c927f3b58745e56d23b831182f438be67f11ce24fdad13543d21d8f7b7d0c79 [INFO] running `"docker" "start" "-a" "7c927f3b58745e56d23b831182f438be67f11ce24fdad13543d21d8f7b7d0c79"` [INFO] [stderr] warning: path `/opt/crater/workdir/src/Calculator.rs` was erroneously implicitly accepted for binary `Calculator`, [INFO] [stderr] please set bin.path in Cargo.toml [INFO] [stderr] Checking Calculator v0.0.1 (/opt/crater/workdir) [INFO] [stderr] warning: unnecessary parentheses around `if` condition [INFO] [stderr] --> src/Calculator.rs:20:9 [INFO] [stderr] | [INFO] [stderr] 20 | if(flag == false) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_parens)] on by default [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `if` condition [INFO] [stderr] --> src/Calculator.rs:32:9 [INFO] [stderr] | [INFO] [stderr] 32 | if(operator == '=') [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/Calculator.rs:73:8 [INFO] [stderr] | [INFO] [stderr] 73 | let mut operator: char = operator_string.chars() [INFO] [stderr] | ----^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: crate `Calculator` should have a snake case name such as `calculator` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(non_snake_case)] on by default [INFO] [stderr] [INFO] [stderr] warning: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/Calculator.rs:20:9 [INFO] [stderr] | [INFO] [stderr] 20 | if(flag == false) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!flag` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/Calculator.rs:48:4 [INFO] [stderr] | [INFO] [stderr] 48 | / io::stdin().read_line(&mut input) [INFO] [stderr] 49 | | .ok() [INFO] [stderr] 50 | | .expect("Failed to read line"); [INFO] [stderr] | |____________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/Calculator.rs:58:7 [INFO] [stderr] | [INFO] [stderr] 58 | Err(_) => panic!(), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/Calculator.rs:67:4 [INFO] [stderr] | [INFO] [stderr] 67 | / io::stdin().read_line(&mut operator_string) [INFO] [stderr] 68 | | .ok() [INFO] [stderr] 69 | | .expect("Failed to read line"); [INFO] [stderr] | |_____________________________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:85:14 [INFO] [stderr] | [INFO] [stderr] 85 | '+' => sum = sum + input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum += input_term` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:86:14 [INFO] [stderr] | [INFO] [stderr] 86 | '-' => sum = sum - input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum -= input_term` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:87:14 [INFO] [stderr] | [INFO] [stderr] 87 | '/' => sum = sum / input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum /= input_term` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:88:14 [INFO] [stderr] | [INFO] [stderr] 88 | '*' => sum = sum * input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum *= input_term` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `if` condition [INFO] [stderr] --> src/Calculator.rs:20:9 [INFO] [stderr] | [INFO] [stderr] 20 | if(flag == false) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_parens)] on by default [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `if` condition [INFO] [stderr] --> src/Calculator.rs:32:9 [INFO] [stderr] | [INFO] [stderr] 32 | if(operator == '=') [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/Calculator.rs:73:8 [INFO] [stderr] | [INFO] [stderr] 73 | let mut operator: char = operator_string.chars() [INFO] [stderr] | ----^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: crate `Calculator` should have a snake case name such as `calculator` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(non_snake_case)] on by default [INFO] [stderr] [INFO] [stderr] warning: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/Calculator.rs:20:9 [INFO] [stderr] | [INFO] [stderr] 20 | if(flag == false) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!flag` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/Calculator.rs:48:4 [INFO] [stderr] | [INFO] [stderr] 48 | / io::stdin().read_line(&mut input) [INFO] [stderr] 49 | | .ok() [INFO] [stderr] 50 | | .expect("Failed to read line"); [INFO] [stderr] | |____________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/Calculator.rs:58:7 [INFO] [stderr] | [INFO] [stderr] 58 | Err(_) => panic!(), [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [INFO] [stderr] [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/Calculator.rs:67:4 [INFO] [stderr] | [INFO] [stderr] 67 | / io::stdin().read_line(&mut operator_string) [INFO] [stderr] 68 | | .ok() [INFO] [stderr] 69 | | .expect("Failed to read line"); [INFO] [stderr] | |_____________________________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:85:14 [INFO] [stderr] | [INFO] [stderr] 85 | '+' => sum = sum + input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum += input_term` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:86:14 [INFO] [stderr] | [INFO] [stderr] 86 | '-' => sum = sum - input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum -= input_term` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:87:14 [INFO] [stderr] | [INFO] [stderr] 87 | '/' => sum = sum / input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum /= input_term` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/Calculator.rs:88:14 [INFO] [stderr] | [INFO] [stderr] 88 | '*' => sum = sum * input_term, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sum *= input_term` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.56s [INFO] running `"docker" "inspect" "7c927f3b58745e56d23b831182f438be67f11ce24fdad13543d21d8f7b7d0c79"` [INFO] running `"docker" "rm" "-f" "7c927f3b58745e56d23b831182f438be67f11ce24fdad13543d21d8f7b7d0c79"` [INFO] [stdout] 7c927f3b58745e56d23b831182f438be67f11ce24fdad13543d21d8f7b7d0c79