[INFO] updating cached repository janisbent/TorCrypto [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/janisbent/TorCrypto [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/janisbent/TorCrypto" "work/ex/clippy-test-run/sources/stable/gh/janisbent/TorCrypto"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/janisbent/TorCrypto'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/janisbent/TorCrypto" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/janisbent/TorCrypto"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/janisbent/TorCrypto'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] bcbe48eb13159b4bd505443b22f1e456fdaa3ab0 [INFO] sha for GitHub repo janisbent/TorCrypto: bcbe48eb13159b4bd505443b22f1e456fdaa3ab0 [INFO] validating manifest of janisbent/TorCrypto 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 janisbent/TorCrypto 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 janisbent/TorCrypto [INFO] finished frobbing janisbent/TorCrypto [INFO] frobbed toml for janisbent/TorCrypto written to work/ex/clippy-test-run/sources/stable/gh/janisbent/TorCrypto/Cargo.toml [INFO] started frobbing janisbent/TorCrypto [INFO] finished frobbing janisbent/TorCrypto [INFO] frobbed toml for janisbent/TorCrypto written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/janisbent/TorCrypto/Cargo.toml [INFO] crate janisbent/TorCrypto 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 janisbent/TorCrypto against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/janisbent/TorCrypto:/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] fd481ee37a7099fd323f3353e0c96c988cdf62b8d3eea8bae870bb3ca2bdacf3 [INFO] running `"docker" "start" "-a" "fd481ee37a7099fd323f3353e0c96c988cdf62b8d3eea8bae870bb3ca2bdacf3"` [INFO] [stderr] Checking tor_crypto v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:65:29 [INFO] [stderr] | [INFO] [stderr] 65 | let mut c = Crypt { sk: sk, pk: [0; 32], pkb: [0; 32], ss: [0; 32] }; [INFO] [stderr] | ^^^^^^ help: replace it with: `sk` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:65:29 [INFO] [stderr] | [INFO] [stderr] 65 | let mut c = Crypt { sk: sk, pk: [0; 32], pkb: [0; 32], ss: [0; 32] }; [INFO] [stderr] | ^^^^^^ help: replace it with: `sk` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `Crypt` [INFO] [stderr] --> src/lib.rs:34:5 [INFO] [stderr] | [INFO] [stderr] 34 | / pub fn new() -> Crypt { [INFO] [stderr] 35 | | let mut rng = rand::thread_rng(); [INFO] [stderr] 36 | | let mut c = Crypt { sk: rng.gen(), pk: [0; 32], pkb: [0; 32], ss: [0; 32] }; [INFO] [stderr] 37 | | c.gen_sk(); [INFO] [stderr] 38 | | c [INFO] [stderr] 39 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 15 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:60:6 [INFO] [stderr] | [INFO] [stderr] 60 | match file.read(&mut sk) { [INFO] [stderr] | _________^ [INFO] [stderr] 61 | | Err(why) => panic!("couldn't read {}: {}", display, [INFO] [stderr] 62 | | why.description()), [INFO] [stderr] 63 | | Ok(_) => (), [INFO] [stderr] 64 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 60 | if let Err(why) = file.read(&mut sk) { panic!("couldn't read {}: {}", display, [INFO] [stderr] 61 | why.description()) } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:88:6 [INFO] [stderr] | [INFO] [stderr] 88 | match file.write(&self.sk) { [INFO] [stderr] | _________^ [INFO] [stderr] 89 | | Err(why) => panic!("couldn't write to {}: {}", display, [INFO] [stderr] 90 | | why.description()), [INFO] [stderr] 91 | | Ok(_) => (), [INFO] [stderr] 92 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 88 | if let Err(why) = file.write(&self.sk) { panic!("couldn't write to {}: {}", display, [INFO] [stderr] 89 | why.description()) } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:113:6 [INFO] [stderr] | [INFO] [stderr] 113 | match file.write(&self.pk) { [INFO] [stderr] | _________^ [INFO] [stderr] 114 | | Err(why) => panic!("couldn't write to {}: {}", display, [INFO] [stderr] 115 | | why.description()), [INFO] [stderr] 116 | | Ok(_) => (), [INFO] [stderr] 117 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 113 | if let Err(why) = file.write(&self.pk) { panic!("couldn't write to {}: {}", display, [INFO] [stderr] 114 | why.description()) } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/lib.rs:205:5 [INFO] [stderr] | [INFO] [stderr] 205 | / match a2.decrypt(&ct, &mut out, &t) { [INFO] [stderr] 206 | | false => println!("Encryption failed!"), [INFO] [stderr] 207 | | true => println!("out: {:?}", out), [INFO] [stderr] 208 | | } [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if a2.decrypt(&ct, &mut out, &t) { println!("out: {:?}", out) } else { println!("Encryption failed!") }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:216:25 [INFO] [stderr] | [INFO] [stderr] 216 | let pkb: [u8; 32] = c.pk.clone(); [INFO] [stderr] | ^^^^^^^^^^^^ help: try removing the `clone` call: `c.pk` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: The function/method `encrypt` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:224:15 [INFO] [stderr] | [INFO] [stderr] 224 | c.encrypt(&mut pt, &mut ct, &mut n, &mut t); [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_mut_passed)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/lib.rs:225:5 [INFO] [stderr] | [INFO] [stderr] 225 | / match c.decrypt(&mut ct, &mut out, &mut n, &mut t) { [INFO] [stderr] 226 | | true => println!("pt2: {:?}", out), [INFO] [stderr] 227 | | false => println!("Failed to decrypt!"), [INFO] [stderr] 228 | | } [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if c.decrypt(&mut ct, &mut out, &mut n, &mut t) { println!("pt2: {:?}", out) } else { println!("Failed to decrypt!") }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: The function/method `decrypt` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:225:40 [INFO] [stderr] | [INFO] [stderr] 225 | match c.decrypt(&mut ct, &mut out, &mut n, &mut t) { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `Crypt` [INFO] [stderr] --> src/lib.rs:34:5 [INFO] [stderr] | [INFO] [stderr] 34 | / pub fn new() -> Crypt { [INFO] [stderr] 35 | | let mut rng = rand::thread_rng(); [INFO] [stderr] 36 | | let mut c = Crypt { sk: rng.gen(), pk: [0; 32], pkb: [0; 32], ss: [0; 32] }; [INFO] [stderr] 37 | | c.gen_sk(); [INFO] [stderr] 38 | | c [INFO] [stderr] 39 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 15 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:60:6 [INFO] [stderr] | [INFO] [stderr] 60 | match file.read(&mut sk) { [INFO] [stderr] | _________^ [INFO] [stderr] 61 | | Err(why) => panic!("couldn't read {}: {}", display, [INFO] [stderr] 62 | | why.description()), [INFO] [stderr] 63 | | Ok(_) => (), [INFO] [stderr] 64 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 60 | if let Err(why) = file.read(&mut sk) { panic!("couldn't read {}: {}", display, [INFO] [stderr] 61 | why.description()) } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:88:6 [INFO] [stderr] | [INFO] [stderr] 88 | match file.write(&self.sk) { [INFO] [stderr] | _________^ [INFO] [stderr] 89 | | Err(why) => panic!("couldn't write to {}: {}", display, [INFO] [stderr] 90 | | why.description()), [INFO] [stderr] 91 | | Ok(_) => (), [INFO] [stderr] 92 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 88 | if let Err(why) = file.write(&self.sk) { panic!("couldn't write to {}: {}", display, [INFO] [stderr] 89 | why.description()) } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:113:6 [INFO] [stderr] | [INFO] [stderr] 113 | match file.write(&self.pk) { [INFO] [stderr] | _________^ [INFO] [stderr] 114 | | Err(why) => panic!("couldn't write to {}: {}", display, [INFO] [stderr] 115 | | why.description()), [INFO] [stderr] 116 | | Ok(_) => (), [INFO] [stderr] 117 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 113 | if let Err(why) = file.write(&self.pk) { panic!("couldn't write to {}: {}", display, [INFO] [stderr] 114 | why.description()) } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/lib.rs:205:5 [INFO] [stderr] | [INFO] [stderr] 205 | / match a2.decrypt(&ct, &mut out, &t) { [INFO] [stderr] 206 | | false => println!("Encryption failed!"), [INFO] [stderr] 207 | | true => println!("out: {:?}", out), [INFO] [stderr] 208 | | } [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if a2.decrypt(&ct, &mut out, &t) { println!("out: {:?}", out) } else { println!("Encryption failed!") }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:216:25 [INFO] [stderr] | [INFO] [stderr] 216 | let pkb: [u8; 32] = c.pk.clone(); [INFO] [stderr] | ^^^^^^^^^^^^ help: try removing the `clone` call: `c.pk` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: The function/method `encrypt` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:224:15 [INFO] [stderr] | [INFO] [stderr] 224 | c.encrypt(&mut pt, &mut ct, &mut n, &mut t); [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_mut_passed)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/lib.rs:225:5 [INFO] [stderr] | [INFO] [stderr] 225 | / match c.decrypt(&mut ct, &mut out, &mut n, &mut t) { [INFO] [stderr] 226 | | true => println!("pt2: {:?}", out), [INFO] [stderr] 227 | | false => println!("Failed to decrypt!"), [INFO] [stderr] 228 | | } [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if c.decrypt(&mut ct, &mut out, &mut n, &mut t) { println!("pt2: {:?}", out) } else { println!("Failed to decrypt!") }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: The function/method `decrypt` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:225:40 [INFO] [stderr] | [INFO] [stderr] 225 | match c.decrypt(&mut ct, &mut out, &mut n, &mut t) { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.24s [INFO] running `"docker" "inspect" "fd481ee37a7099fd323f3353e0c96c988cdf62b8d3eea8bae870bb3ca2bdacf3"` [INFO] running `"docker" "rm" "-f" "fd481ee37a7099fd323f3353e0c96c988cdf62b8d3eea8bae870bb3ca2bdacf3"` [INFO] [stdout] fd481ee37a7099fd323f3353e0c96c988cdf62b8d3eea8bae870bb3ca2bdacf3