[INFO] cloning repository https://github.com/wgaylord/RustReflector [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/wgaylord/RustReflector" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwgaylord%2FRustReflector", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwgaylord%2FRustReflector'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2a99bd21a14971c65f677f6a228b7ec51de4e81f [INFO] linting wgaylord/RustReflector against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwgaylord%2FRustReflector" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/wgaylord/RustReflector [INFO] finished tweaking git repo https://github.com/wgaylord/RustReflector [INFO] tweaked toml for git repo https://github.com/wgaylord/RustReflector written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/wgaylord/RustReflector 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/wgaylord/RustReflector 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-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 52c71b07d115780eec5ffa3d5aab85fbaea36bf8e38a8e48ebb9ce153b1c23b6 [INFO] running `Command { std: "docker" "start" "-a" "52c71b07d115780eec5ffa3d5aab85fbaea36bf8e38a8e48ebb9ce153b1c23b6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "52c71b07d115780eec5ffa3d5aab85fbaea36bf8e38a8e48ebb9ce153b1c23b6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "52c71b07d115780eec5ffa3d5aab85fbaea36bf8e38a8e48ebb9ce153b1c23b6", kill_on_drop: false }` [INFO] [stdout] 52c71b07d115780eec5ffa3d5aab85fbaea36bf8e38a8e48ebb9ce153b1c23b6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] e108ede8ff31d07447a28c28a9ba47cf48d13798cc4f345f378749486c346b54 [INFO] running `Command { std: "docker" "start" "-a" "e108ede8ff31d07447a28c28a9ba47cf48d13798cc4f345f378749486c346b54", kill_on_drop: false }` [INFO] [stderr] Compiling syn v1.0.86 [INFO] [stderr] Compiling time-macros v0.2.3 [INFO] [stderr] Checking num_threads v0.1.3 [INFO] [stderr] Checking chunked_transfer v1.4.0 [INFO] [stderr] Checking ascii v1.0.0 [INFO] [stderr] Compiling quote v1.0.15 [INFO] [stderr] Checking time v0.3.7 [INFO] [stderr] Checking tiny_http v0.11.0 [INFO] [stderr] Compiling serde_derive v1.0.136 [INFO] [stderr] Checking serde v1.0.136 [INFO] [stderr] Checking serde_json v1.0.79 [INFO] [stderr] Checking m17_reflector v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | module: module, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `module` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | module: module, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `module` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | fn pong(&mut self,) -> (){ //Set last pong recv time and set that we are not waiting for a pong. [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | fn ping(&mut self,) -> (){ //Set ping. [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [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/main.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | / match rx.try_recv(){ [INFO] [stdout] 78 | | Ok(clients) => { [INFO] [stdout] 79 | | client_list [INFO] [stdout] 80 | | = clients; [INFO] [stdout] ... | [INFO] [stdout] 83 | | _ => {} [INFO] [stdout] 84 | | } [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] 77 ~ if let Ok(clients) = rx.try_recv() { [INFO] [stdout] 78 + client_list [INFO] [stdout] 79 + = clients; [INFO] [stdout] 80 + [INFO] [stdout] 81 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:140:34 [INFO] [stdout] | [INFO] [stdout] 140 | for (_key, value) in &clients { //Loop over all the clients. [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 140 - for (_key, value) in &clients { //Loop over all the clients. [INFO] [stdout] 140 + for value in clients.values() { //Loop over all the clients. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | / let mut clients_info = Vec::::new(); [INFO] [stdout] 142 | | clients_info.push(ClientInfo{callsign: value.callsign,module: value.module,talking: value.talking}); [INFO] [stdout] | |____________________________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let clients_info = 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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:204:24 [INFO] [stdout] | [INFO] [stdout] 204 | if !(value.socket_addr == addr) { // As long as its not the sender continue to next check. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(value.socket_addr != addr)` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:185:29 [INFO] [stdout] | [INFO] [stdout] 185 | / ... match parrot.get_mut(&addr){ //Get client from the hashmap [INFO] [stdout] 186 | | ... Some(voice_buffer) => { //Client existed [INFO] [stdout] 187 | | ... while !voice_buffer.is_empty(){ [INFO] [stdout] 188 | | ... socket.send_to(&voice_buffer.pop_front().expect("Error getting voice from voice buffer in parrot"),addr).expect... [INFO] [stdout] ... | [INFO] [stdout] 193 | | ... None => {} [INFO] [stdout] 194 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 185 ~ if let Some(voice_buffer) = parrot.get_mut(&addr) { //Client existed [INFO] [stdout] 186 + while !voice_buffer.is_empty(){ [INFO] [stdout] 187 + socket.send_to(&voice_buffer.pop_front().expect("Error getting voice from voice buffer in parrot"),addr).expect("Error sending M17");//Send them the packet. (Should there be any packet rewriting here? Docs make this unclear.) [INFO] [stdout] 188 + [INFO] [stdout] 189 + } [INFO] [stdout] 190 + parrot.remove(&addr); [INFO] [stdout] 191 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:203:38 [INFO] [stdout] | [INFO] [stdout] 203 | for (_key, value) in &*clients { //Loop over all the clients. [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 203 - for (_key, value) in &*clients { //Loop over all the clients. [INFO] [stdout] 203 + for value in (*clients).values() { //Loop over all the clients. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 54]` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:213:52 [INFO] [stdout] | [INFO] [stdout] 213 | ... voice_buffer.push_back(buf.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | fn pong(&mut self,) -> (){ //Set last pong recv time and set that we are not waiting for a pong. [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | fn ping(&mut self,) -> (){ //Set ping. [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [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/main.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | / match rx.try_recv(){ [INFO] [stdout] 78 | | Ok(clients) => { [INFO] [stdout] 79 | | client_list [INFO] [stdout] 80 | | = clients; [INFO] [stdout] ... | [INFO] [stdout] 83 | | _ => {} [INFO] [stdout] 84 | | } [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] 77 ~ if let Ok(clients) = rx.try_recv() { [INFO] [stdout] 78 + client_list [INFO] [stdout] 79 + = clients; [INFO] [stdout] 80 + [INFO] [stdout] 81 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:140:34 [INFO] [stdout] | [INFO] [stdout] 140 | for (_key, value) in &clients { //Loop over all the clients. [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 140 - for (_key, value) in &clients { //Loop over all the clients. [INFO] [stdout] 140 + for value in clients.values() { //Loop over all the clients. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | / let mut clients_info = Vec::::new(); [INFO] [stdout] 142 | | clients_info.push(ClientInfo{callsign: value.callsign,module: value.module,talking: value.talking}); [INFO] [stdout] | |____________________________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let clients_info = 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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:204:24 [INFO] [stdout] | [INFO] [stdout] 204 | if !(value.socket_addr == addr) { // As long as its not the sender continue to next check. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(value.socket_addr != addr)` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:185:29 [INFO] [stdout] | [INFO] [stdout] 185 | / ... match parrot.get_mut(&addr){ //Get client from the hashmap [INFO] [stdout] 186 | | ... Some(voice_buffer) => { //Client existed [INFO] [stdout] 187 | | ... while !voice_buffer.is_empty(){ [INFO] [stdout] 188 | | ... socket.send_to(&voice_buffer.pop_front().expect("Error getting voice from voice buffer in parrot"),addr).expect... [INFO] [stdout] ... | [INFO] [stdout] 193 | | ... None => {} [INFO] [stdout] 194 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 185 ~ if let Some(voice_buffer) = parrot.get_mut(&addr) { //Client existed [INFO] [stdout] 186 + while !voice_buffer.is_empty(){ [INFO] [stdout] 187 + socket.send_to(&voice_buffer.pop_front().expect("Error getting voice from voice buffer in parrot"),addr).expect("Error sending M17");//Send them the packet. (Should there be any packet rewriting here? Docs make this unclear.) [INFO] [stdout] 188 + [INFO] [stdout] 189 + } [INFO] [stdout] 190 + parrot.remove(&addr); [INFO] [stdout] 191 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/main.rs:203:38 [INFO] [stdout] | [INFO] [stdout] 203 | for (_key, value) in &*clients { //Loop over all the clients. [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 203 - for (_key, value) in &*clients { //Loop over all the clients. [INFO] [stdout] 203 + for value in (*clients).values() { //Loop over all the clients. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 54]` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:213:52 [INFO] [stdout] | [INFO] [stdout] 213 | ... voice_buffer.push_back(buf.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.06s [INFO] running `Command { std: "docker" "inspect" "e108ede8ff31d07447a28c28a9ba47cf48d13798cc4f345f378749486c346b54", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e108ede8ff31d07447a28c28a9ba47cf48d13798cc4f345f378749486c346b54", kill_on_drop: false }` [INFO] [stdout] e108ede8ff31d07447a28c28a9ba47cf48d13798cc4f345f378749486c346b54