[INFO] cloning repository https://github.com/ronistone/leader_election_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ronistone/leader_election_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fronistone%2Fleader_election_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fronistone%2Fleader_election_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] dd2613df117866c0a06357c611ec8c5553894d64 [INFO] linting ronistone/leader_election_rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fronistone%2Fleader_election_rust" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ronistone/leader_election_rust [INFO] finished tweaking git repo https://github.com/ronistone/leader_election_rust [INFO] tweaked toml for git repo https://github.com/ronistone/leader_election_rust written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ronistone/leader_election_rust 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/ronistone/leader_election_rust 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] [stderr] warning: unused manifest key: build [INFO] [stderr] help: build is a valid .cargo/config.toml key [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded console-api v0.7.0 [INFO] [stderr] Downloaded prost-types v0.12.6 [INFO] [stderr] Downloaded tonic v0.11.0 [INFO] [stderr] Downloaded console-subscriber v0.3.0 [INFO] [stderr] Downloaded syn v2.0.52 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] c3e77c3b127623470c7398c4923e8e19763b2adc45f5ab6f8d54eaefb89a84cf [INFO] running `Command { std: "docker" "start" "-a" "c3e77c3b127623470c7398c4923e8e19763b2adc45f5ab6f8d54eaefb89a84cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c3e77c3b127623470c7398c4923e8e19763b2adc45f5ab6f8d54eaefb89a84cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c3e77c3b127623470c7398c4923e8e19763b2adc45f5ab6f8d54eaefb89a84cf", kill_on_drop: false }` [INFO] [stdout] c3e77c3b127623470c7398c4923e8e19763b2adc45f5ab6f8d54eaefb89a84cf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 8d02b57c9d7ccced62f360ad84fac636fb1d5fd707f03097e9aadaa0b82a38fe [INFO] running `Command { std: "docker" "start" "-a" "8d02b57c9d7ccced62f360ad84fac636fb1d5fd707f03097e9aadaa0b82a38fe", kill_on_drop: false }` [INFO] [stderr] warning: unused manifest key: build [INFO] [stderr] help: build is a valid .cargo/config.toml key [INFO] [stderr] Checking bytes v1.5.0 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Checking memchr v2.7.2 [INFO] [stderr] Compiling syn v2.0.52 [INFO] [stderr] Checking smallvec v1.13.1 [INFO] [stderr] Checking futures-sink v0.3.30 [INFO] [stderr] Checking socket2 v0.5.6 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking signal-hook-registry v1.4.1 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking parking_lot_core v0.9.9 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling rustversion v1.0.17 [INFO] [stderr] Compiling httparse v1.9.4 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Compiling serde v1.0.197 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Compiling anyhow v1.0.86 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling either v1.13.0 [INFO] [stderr] Compiling itertools v0.12.1 [INFO] [stderr] Checking tower-layer v0.3.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking regex-syntax v0.8.4 [INFO] [stderr] Compiling axum-core v0.3.4 [INFO] [stderr] Checking indexmap v2.2.6 [INFO] [stderr] Compiling axum v0.6.20 [INFO] [stderr] Checking matchit v0.7.3 [INFO] [stderr] Checking anstyle-parse v0.2.3 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking miniz_oxide v0.7.2 [INFO] [stderr] Compiling serde_json v1.0.120 [INFO] [stderr] Checking anstyle-query v1.0.2 [INFO] [stderr] Checking anstream v0.6.13 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking strsim v0.11.0 [INFO] [stderr] Checking flate2 v1.0.30 [INFO] [stderr] Checking clap_builder v4.5.2 [INFO] [stderr] Checking regex-automata v0.4.7 [INFO] [stderr] Checking hdrhistogram v7.5.4 [INFO] [stderr] Checking regex v1.10.5 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling tokio-macros v2.2.0 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling serde_derive v1.0.197 [INFO] [stderr] Compiling pin-project-internal v1.1.5 [INFO] [stderr] Compiling prost-derive v0.12.6 [INFO] [stderr] Compiling async-trait v0.1.80 [INFO] [stderr] Compiling async-stream-impl v0.3.5 [INFO] [stderr] Checking tokio v1.37.0 [INFO] [stderr] Checking async-stream v0.3.5 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Compiling clap_derive v4.5.4 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking tracing-subscriber v0.3.18 [INFO] [stderr] Checking pin-project v1.1.5 [INFO] [stderr] Checking prost v0.12.6 [INFO] [stderr] Checking prost-types v0.12.6 [INFO] [stderr] Checking clap v4.5.4 [INFO] [stderr] Checking futures-executor v0.3.30 [INFO] [stderr] Checking futures v0.3.30 [INFO] [stderr] Checking tokio-util v0.7.10 [INFO] [stderr] Checking tokio-io-timeout v1.2.0 [INFO] [stderr] Checking tokio-stream v0.1.15 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking h2 v0.3.26 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking hyper v0.14.29 [INFO] [stderr] Checking hyper-timeout v0.4.1 [INFO] [stderr] Checking tonic v0.11.0 [INFO] [stderr] Checking console-api v0.7.0 [INFO] [stderr] Checking console-subscriber v0.3.0 [INFO] [stderr] Checking leader_election_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> src/communication/communication.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Peer [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 36 | pub id: Arc>, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Connection` is never constructed [INFO] [stdout] --> src/communication/net.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub struct Connection { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> src/communication/communication.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Peer [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 36 | pub id: Arc>, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Connection` is never constructed [INFO] [stdout] --> src/communication/net.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub struct Connection { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/algorithms/bully.rs:108:40 [INFO] [stdout] | [INFO] [stdout] 108 | ... if !lock.leader.is_none() && lock.leader.unwrap() == id { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `lock.leader.is_some()` [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/algorithms/bully.rs:108:40 [INFO] [stdout] | [INFO] [stdout] 108 | ... if !lock.leader.is_none() && lock.leader.unwrap() == id { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `lock.leader.is_some()` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:89:54 [INFO] [stdout] | [INFO] [stdout] 89 | ... let old_leader = write.leader.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `write.leader` [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: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:135:23 [INFO] [stdout] | [INFO] [stdout] 135 | let node_id = lock.id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lock.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/algorithms/bully.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | let peers: Vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 150 | peers = lock.node_communication.get_peers().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `peers` here [INFO] [stdout] | [INFO] [stdout] 146 ~ [INFO] [stdout] 147 | let node_id: u16; [INFO] [stdout] 148 | let mut lock = node.write().await; [INFO] [stdout] 149 | node_id = lock.id; [INFO] [stdout] 150 ~ let peers: Vec = lock.node_communication.get_peers().await; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/algorithms/bully.rs:147:5 [INFO] [stdout] | [INFO] [stdout] 147 | let node_id: u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 148 | let mut lock = node.write().await; [INFO] [stdout] 149 | node_id = lock.id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `node_id` here [INFO] [stdout] | [INFO] [stdout] 147 ~ [INFO] [stdout] 148 | let mut lock = node.write().await; [INFO] [stdout] 149 ~ let node_id: u16 = lock.id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:89:54 [INFO] [stdout] | [INFO] [stdout] 89 | ... let old_leader = write.leader.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `write.leader` [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: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:160:25 [INFO] [stdout] | [INFO] [stdout] 160 | let p = peer_id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:166:77 [INFO] [stdout] | [INFO] [stdout] 166 | MessageBase::Custom(InternalMessage::Election { id: node_id.clone() }) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:135:23 [INFO] [stdout] | [INFO] [stdout] 135 | let node_id = lock.id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lock.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:201:19 [INFO] [stdout] | [INFO] [stdout] 201 | let node_id = write.id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `write.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/algorithms/bully.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | let peers: Vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 150 | peers = lock.node_communication.get_peers().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `peers` here [INFO] [stdout] | [INFO] [stdout] 146 ~ [INFO] [stdout] 147 | let node_id: u16; [INFO] [stdout] 148 | let mut lock = node.write().await; [INFO] [stdout] 149 | node_id = lock.id; [INFO] [stdout] 150 ~ let peers: Vec = lock.node_communication.get_peers().await; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/algorithms/bully.rs:222:40 [INFO] [stdout] | [INFO] [stdout] 222 | if state == State::Follower && !last_alive.is_none() && last_alive.unwrap().elapsed() > Duration::from_secs(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `last_alive.is_some()` [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: unneeded late initialization [INFO] [stdout] --> src/algorithms/bully.rs:147:5 [INFO] [stdout] | [INFO] [stdout] 147 | let node_id: u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 148 | let mut lock = node.write().await; [INFO] [stdout] 149 | node_id = lock.id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `node_id` here [INFO] [stdout] | [INFO] [stdout] 147 ~ [INFO] [stdout] 148 | let mut lock = node.write().await; [INFO] [stdout] 149 ~ let node_id: u16 = lock.id; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:217:26 [INFO] [stdout] | [INFO] [stdout] 217 | let last_alive = read.last_alive.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `read.last_alive` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:160:25 [INFO] [stdout] | [INFO] [stdout] 160 | let p = peer_id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:166:77 [INFO] [stdout] | [INFO] [stdout] 166 | MessageBase::Custom(InternalMessage::Election { id: node_id.clone() }) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:244:22 [INFO] [stdout] | [INFO] [stdout] 244 | let id = write.id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `write.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/communication.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod communication; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:201:19 [INFO] [stdout] | [INFO] [stdout] 201 | let node_id = write.id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `write.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/algorithms/bully.rs:222:40 [INFO] [stdout] | [INFO] [stdout] 222 | if state == State::Follower && !last_alive.is_none() && last_alive.unwrap().elapsed() > Duration::from_secs(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `last_alive.is_some()` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:217:26 [INFO] [stdout] | [INFO] [stdout] 217 | let last_alive = read.last_alive.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `read.last_alive` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/algorithms/bully.rs:244:22 [INFO] [stdout] | [INFO] [stdout] 244 | let id = write.id.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `write.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/communication.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod communication; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/communication/communication.rs:67:97 [INFO] [stdout] | [INFO] [stdout] 67 | tokio::spawn(connect_to_peer(receiver_channel.clone(), self.peers_channels.clone(), peer.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/communication/communication.rs:113:17 [INFO] [stdout] | [INFO] [stdout] 113 | let p = peer.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/communication/communication.rs:67:97 [INFO] [stdout] | [INFO] [stdout] 67 | tokio::spawn(connect_to_peer(receiver_channel.clone(), self.peers_channels.clone(), peer.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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/communication/communication.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | / match message { [INFO] [stdout] 190 | | MessageBase::Custom(message) => { [INFO] [stdout] 191 | | { [INFO] [stdout] 192 | | let _ = tx.send(message).await; [INFO] [stdout] ... | [INFO] [stdout] 195 | | _ => {} [INFO] [stdout] 196 | | } [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] 189 ~ if let MessageBase::Custom(message) = message { [INFO] [stdout] 190 + { [INFO] [stdout] 191 + let _ = tx.send(message).await; [INFO] [stdout] 192 + } [INFO] [stdout] 193 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/communication/communication.rs:113:17 [INFO] [stdout] | [INFO] [stdout] 113 | let p = peer.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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/communication/communication.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | / match message { [INFO] [stdout] 190 | | MessageBase::Custom(message) => { [INFO] [stdout] 191 | | { [INFO] [stdout] 192 | | let _ = tx.send(message).await; [INFO] [stdout] ... | [INFO] [stdout] 195 | | _ => {} [INFO] [stdout] 196 | | } [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] 189 ~ if let MessageBase::Custom(message) = message { [INFO] [stdout] 190 + { [INFO] [stdout] 191 + let _ = tx.send(message).await; [INFO] [stdout] 192 + } [INFO] [stdout] 193 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 02s [INFO] running `Command { std: "docker" "inspect" "8d02b57c9d7ccced62f360ad84fac636fb1d5fd707f03097e9aadaa0b82a38fe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8d02b57c9d7ccced62f360ad84fac636fb1d5fd707f03097e9aadaa0b82a38fe", kill_on_drop: false }` [INFO] [stdout] 8d02b57c9d7ccced62f360ad84fac636fb1d5fd707f03097e9aadaa0b82a38fe