[INFO] cloning repository https://github.com/Elianagam/blockchain [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Elianagam/blockchain" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FElianagam%2Fblockchain", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FElianagam%2Fblockchain'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 16af333f91d0a37dd8dadccd24e67988e3394ae6 [INFO] linting Elianagam/blockchain against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FElianagam%2Fblockchain" "/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/Elianagam/blockchain [INFO] finished tweaking git repo https://github.com/Elianagam/blockchain [INFO] tweaked toml for git repo https://github.com/Elianagam/blockchain written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Elianagam/blockchain 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/Elianagam/blockchain 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded std-semaphore v0.1.0 [INFO] [stderr] Downloaded typenum v1.13.0 [INFO] [stderr] Downloaded blake2 v0.9.1 [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] af68970753c43113fc2ca09d12a4d1def6a90ecf036713e955f8fb62bc0fcad7 [INFO] running `Command { std: "docker" "start" "-a" "af68970753c43113fc2ca09d12a4d1def6a90ecf036713e955f8fb62bc0fcad7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "af68970753c43113fc2ca09d12a4d1def6a90ecf036713e955f8fb62bc0fcad7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "af68970753c43113fc2ca09d12a4d1def6a90ecf036713e955f8fb62bc0fcad7", kill_on_drop: false }` [INFO] [stdout] af68970753c43113fc2ca09d12a4d1def6a90ecf036713e955f8fb62bc0fcad7 [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] 6ffe9859b1310cdc8228a0ac14c9911c6a4ac77a961f4adb82e502e1daeb5512 [INFO] running `Command { std: "docker" "start" "-a" "6ffe9859b1310cdc8228a0ac14c9911c6a4ac77a961f4adb82e502e1daeb5512", kill_on_drop: false }` [INFO] [stderr] Compiling version_check v0.9.3 [INFO] [stderr] Compiling typenum v1.13.0 [INFO] [stderr] Checking subtle v2.4.1 [INFO] [stderr] Checking opaque-debug v0.3.0 [INFO] [stderr] Checking std-semaphore v0.1.0 [INFO] [stderr] Compiling generic-array v0.14.4 [INFO] [stderr] Checking crypto-mac v0.8.0 [INFO] [stderr] Checking digest v0.9.0 [INFO] [stderr] Checking blake2 v0.9.1 [INFO] [stderr] Checking blockchain v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `pending_records` is never read [INFO] [stdout] --> src/blockchain/blockchain.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct Blockchain { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | pending_records: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Blockchain` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_student_ids`, `get_student_by_id_mut`, and `get_student_by_id` are never used [INFO] [stdout] --> src/blockchain/world_state.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub trait WorldState { [INFO] [stdout] | ---------- methods in this trait [INFO] [stdout] 6 | /// Returns all registered student ids [INFO] [stdout] 7 | fn get_student_ids(&self) -> Vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 10 | fn get_student_by_id_mut(&mut self, id: &String) -> Option<&mut Student>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | fn get_student_by_id(&self, id: &String) -> Option<&Student>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/node.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | if port_number < 8000 || port_number > (8000 + MAX_NODES) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(8000..=(8000 + MAX_NODES)).contains(&port_number)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:101:26 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn run(&mut self) -> () { [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/node.rs:103:49 [INFO] [stdout] | [INFO] [stdout] 103 | self.socket.local_addr().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/node.rs:133:15 [INFO] [stdout] | [INFO] [stdout] 133 | while self.running_threads.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.running_threads.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: called `Option::take()` on a temporary value [INFO] [stdout] --> src/node.rs:135:13 [INFO] [stdout] | [INFO] [stdout] 135 | t.take().unwrap().take().unwrap().join().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | help: remove [INFO] [stdout] | [INFO] [stdout] = note: `unwrap` creates a temporary value, so calling take() has no effect [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_take [INFO] [stdout] = note: `#[warn(clippy::needless_option_take)]` 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/node.rs:195:13 [INFO] [stdout] | [INFO] [stdout] 195 | / match blockchain_mut.append_block(block) { [INFO] [stdout] 196 | | Err(err) => println!("{}", err), [INFO] [stdout] 197 | | Ok(_) => {} [INFO] [stdout] 198 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = blockchain_mut.append_block(block) { println!("{}", err) }` [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] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:232:34 [INFO] [stdout] | [INFO] [stdout] 232 | fn discover_leader(&mut self) -> () { [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: unneeded unit return type [INFO] [stdout] --> src/node.rs:248:43 [INFO] [stdout] | [INFO] [stdout] 248 | fn detect_if_leader_is_down(&mut self) -> () { [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/node.rs:275:16 [INFO] [stdout] | [INFO] [stdout] 275 | if *leader_addr_mut == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `(*leader_addr_mut).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:286:35 [INFO] [stdout] | [INFO] [stdout] 286 | fn handle_lock_acquired(&self) -> () { [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: unneeded unit return type [INFO] [stdout] --> src/node.rs:294:61 [INFO] [stdout] | [INFO] [stdout] 294 | fn handle_coordinator_msg(&mut self, leader: SocketAddr) -> () { [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: manual implementation of an assign operation [INFO] [stdout] --> src/node.rs:326:17 [INFO] [stdout] | [INFO] [stdout] 326 | *not_released_nodes = *not_released_nodes + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*not_released_nodes += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/node.rs:347:33 [INFO] [stdout] | [INFO] [stdout] 347 | ... node.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:376:64 [INFO] [stdout] | [INFO] [stdout] 376 | fn check_if_i_am_leader(&mut self, node_that_asked: String) -> () { [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/node.rs:426:9 [INFO] [stdout] | [INFO] [stdout] 418 | / let record = Record::new( [INFO] [stdout] 419 | | from.to_string().into(), [INFO] [stdout] 420 | | RecordData::CreateStudent( [INFO] [stdout] 421 | | student_data[0].into(), [INFO] [stdout] ... | [INFO] [stdout] 424 | | Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 425 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 426 | record [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 418 ~ [INFO] [stdout] 419 ~ Record::new( [INFO] [stdout] 420 + from.to_string().into(), [INFO] [stdout] 421 + RecordData::CreateStudent( [INFO] [stdout] 422 + student_data[0].into(), [INFO] [stdout] 423 + student_data[1].parse::().unwrap(), [INFO] [stdout] 424 + ), [INFO] [stdout] 425 + Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 426 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/node.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | from.to_string().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `from.to_string()` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/node.rs:440:9 [INFO] [stdout] | [INFO] [stdout] 432 | / let record = Record::new( [INFO] [stdout] 433 | | student_data[3].to_string(), [INFO] [stdout] 434 | | RecordData::CreateStudent( [INFO] [stdout] 435 | | student_data[0].into(), [INFO] [stdout] ... | [INFO] [stdout] 438 | | Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 439 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 440 | record [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 432 ~ [INFO] [stdout] 433 ~ Record::new( [INFO] [stdout] 434 + student_data[3].to_string(), [INFO] [stdout] 435 + RecordData::CreateStudent( [INFO] [stdout] 436 + student_data[0].into(), [INFO] [stdout] 437 + student_data[1].parse::().unwrap(), [INFO] [stdout] 438 + ), [INFO] [stdout] 439 + Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 440 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/block.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | return Vec::from(hasher.finalize().as_ref()); [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] 39 - return Vec::from(hasher.finalize().as_ref()); [INFO] [stdout] 39 + Vec::from(hasher.finalize().as_ref()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/block.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | / return self.hash.is_some() && [INFO] [stdout] 61 | | self.hash.as_ref().unwrap().eq(&byte_vector_to_string(&self.calculate_hash())); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 60 ~ self.hash.is_some() && [INFO] [stdout] 61 ~ self.hash.as_ref().unwrap().eq(&byte_vector_to_string(&self.calculate_hash())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain/block.rs:66:35 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn byte_vector_to_string(arr: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 66 - pub fn byte_vector_to_string(arr: &Vec) -> String { [INFO] [stdout] 66 + pub fn byte_vector_to_string(arr: &[u8]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/blockchain/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod blockchain; [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: this boolean expression can be simplified [INFO] [stdout] --> src/blockchain/blockchain.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !(block.prev_hash == self.get_last_block_hash()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(block.prev_hash != self.get_last_block_hash())` [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: useless use of `format!` [INFO] [stdout] --> src/blockchain/blockchain.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | let mut data = format!("Blockchain:\n\tPadron\tNota"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Blockchain:\n\tPadron\tNota".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `pending_records` is never read [INFO] [stdout] --> src/blockchain/blockchain.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct Blockchain { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | pending_records: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Blockchain` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/record.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / return match &self.record { [INFO] [stdout] 36 | | RecordData::CreateStudent(id, qualification) => { [INFO] [stdout] 37 | | world_state.create_student(id.into(), *qualification) [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | }; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 35 ~ match &self.record { [INFO] [stdout] 36 + RecordData::CreateStudent(id, qualification) => { [INFO] [stdout] 37 + world_state.create_student(id.into(), *qualification) [INFO] [stdout] 38 + } [INFO] [stdout] 39 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_student_ids`, `get_student_by_id_mut`, and `get_student_by_id` are never used [INFO] [stdout] --> src/blockchain/world_state.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub trait WorldState { [INFO] [stdout] | ---------- methods in this trait [INFO] [stdout] 6 | /// Returns all registered student ids [INFO] [stdout] 7 | fn get_student_ids(&self) -> Vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 10 | fn get_student_by_id_mut(&mut self, id: &String) -> Option<&mut Student>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | fn get_student_by_id(&self, id: &String) -> Option<&Student>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/record.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | return Vec::from(hasher.finalize().as_ref()); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return Vec::from(hasher.finalize().as_ref()); [INFO] [stdout] 48 + Vec::from(hasher.finalize().as_ref()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain/world_state.rs:10:45 [INFO] [stdout] | [INFO] [stdout] 10 | fn get_student_by_id_mut(&mut self, id: &String) -> Option<&mut Student>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain/world_state.rs:13:37 [INFO] [stdout] | [INFO] [stdout] 13 | fn get_student_by_id(&self, id: &String) -> Option<&Student>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/blockchain/world_state.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | self.students.keys().map(|s| s.clone()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.students.keys().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/world_state.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | return Ok(()); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 36 - return Ok(()); [INFO] [stdout] 36 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/world_state.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | return Err("Qualification must be between 1 and 10"); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 38 - return Err("Qualification must be between 1 and 10"); [INFO] [stdout] 38 + Err("Qualification must be between 1 and 10") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/blockchain/world_state.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | if qualification >= 1 && qualification <= 10 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=10).contains(&qualification)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/node.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | if port_number < 8000 || port_number > (8000 + MAX_NODES) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(8000..=(8000 + MAX_NODES)).contains(&port_number)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/leader_discoverer.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn run(&mut self) -> () { [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: unneeded unit return type [INFO] [stdout] --> src/node.rs:101:26 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn run(&mut self) -> () { [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/node.rs:103:49 [INFO] [stdout] | [INFO] [stdout] 103 | self.socket.local_addr().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/leader_discoverer.rs:65:16 [INFO] [stdout] | [INFO] [stdout] 65 | if *leader_found == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `*leader_found` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/leader_discoverer.rs:68:34 [INFO] [stdout] | [INFO] [stdout] 68 | self.logger.info(format!("TIMEOUT: Leader not found, I become leader")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"TIMEOUT: Leader not found, I become leader".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/leader_down_handler.rs:45:26 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn run(&mut self) -> () { [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: length comparison to zero [INFO] [stdout] --> src/node.rs:133:15 [INFO] [stdout] | [INFO] [stdout] 133 | while self.running_threads.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.running_threads.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: useless use of `format!` [INFO] [stdout] --> src/leader_down_handler.rs:68:26 [INFO] [stdout] | [INFO] [stdout] 68 | self.logger.info(format!("Running bully algorithm")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Running bully algorithm".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Option::take()` on a temporary value [INFO] [stdout] --> src/node.rs:135:13 [INFO] [stdout] | [INFO] [stdout] 135 | t.take().unwrap().take().unwrap().join().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | help: remove [INFO] [stdout] | [INFO] [stdout] = note: `unwrap` creates a temporary value, so calling take() has no effect [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_take [INFO] [stdout] = note: `#[warn(clippy::needless_option_take)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/leader_down_handler.rs:106:16 [INFO] [stdout] | [INFO] [stdout] 106 | if &addr != &*self.my_address.read().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 106 - if &addr != &*self.my_address.read().unwrap() { [INFO] [stdout] 106 + if addr != *self.my_address.read().unwrap() { [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/node.rs:195:13 [INFO] [stdout] | [INFO] [stdout] 195 | / match blockchain_mut.append_block(block) { [INFO] [stdout] 196 | | Err(err) => println!("{}", err), [INFO] [stdout] 197 | | Ok(_) => {} [INFO] [stdout] 198 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = blockchain_mut.append_block(block) { println!("{}", err) }` [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] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/stdin_reader.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / pub fn new( [INFO] [stdout] 30 | | leader_condvar: Arc<(Mutex, Condvar)>, [INFO] [stdout] 31 | | socket: Socket, [INFO] [stdout] 32 | | leader_addr: Arc>>, [INFO] [stdout] ... | [INFO] [stdout] 38 | | blockchain_logger: Arc [INFO] [stdout] 39 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/stdin_reader.rs:66:16 [INFO] [stdout] | [INFO] [stdout] 66 | if &value == "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/stdin_reader.rs:69:16 [INFO] [stdout] | [INFO] [stdout] 69 | if &value == CLOSE { [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:232:34 [INFO] [stdout] | [INFO] [stdout] 232 | fn discover_leader(&mut self) -> () { [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: unneeded unit return type [INFO] [stdout] --> src/node.rs:248:43 [INFO] [stdout] | [INFO] [stdout] 248 | fn detect_if_leader_is_down(&mut self) -> () { [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stdin_reader.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 131 | let line = iterator.next().unwrap().unwrap(); [INFO] [stdout] | --------------------------------------------- unnecessary `let` binding [INFO] [stdout] 132 | line [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 131 ~ [INFO] [stdout] 132 ~ iterator.next().unwrap().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/node.rs:275:16 [INFO] [stdout] | [INFO] [stdout] 275 | if *leader_addr_mut == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `(*leader_addr_mut).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/stdin_reader.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return line.to_string(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return line.to_string(); [INFO] [stdout] 145 + line.to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:286:35 [INFO] [stdout] | [INFO] [stdout] 286 | fn handle_lock_acquired(&self) -> () { [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: unneeded `return` statement [INFO] [stdout] --> src/stdin_reader.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return String::new(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return String::new(); [INFO] [stdout] 162 + String::new() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:294:61 [INFO] [stdout] | [INFO] [stdout] 294 | fn handle_coordinator_msg(&mut self, leader: SocketAddr) -> () { [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: manual implementation of an assign operation [INFO] [stdout] --> src/node.rs:326:17 [INFO] [stdout] | [INFO] [stdout] 326 | *not_released_nodes = *not_released_nodes + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*not_released_nodes += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/node.rs:347:33 [INFO] [stdout] | [INFO] [stdout] 347 | ... node.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/node.rs:376:64 [INFO] [stdout] | [INFO] [stdout] 376 | fn check_if_i_am_leader(&mut self, node_that_asked: String) -> () { [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | return -1; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - return -1; [INFO] [stdout] 21 + -1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/node.rs:426:9 [INFO] [stdout] | [INFO] [stdout] 418 | / let record = Record::new( [INFO] [stdout] 419 | | from.to_string().into(), [INFO] [stdout] 420 | | RecordData::CreateStudent( [INFO] [stdout] 421 | | student_data[0].into(), [INFO] [stdout] ... | [INFO] [stdout] 424 | | Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 425 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 426 | record [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 418 ~ [INFO] [stdout] 419 ~ Record::new( [INFO] [stdout] 420 + from.to_string().into(), [INFO] [stdout] 421 + RecordData::CreateStudent( [INFO] [stdout] 422 + student_data[0].into(), [INFO] [stdout] 423 + student_data[1].parse::().unwrap(), [INFO] [stdout] 424 + ), [INFO] [stdout] 425 + Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 426 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/encoder.rs:7:39 [INFO] [stdout] | [INFO] [stdout] 7 | let mut message = String::from(msg.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/node.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | from.to_string().into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `from.to_string()` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/node.rs:440:9 [INFO] [stdout] | [INFO] [stdout] 432 | / let record = Record::new( [INFO] [stdout] 433 | | student_data[3].to_string(), [INFO] [stdout] 434 | | RecordData::CreateStudent( [INFO] [stdout] 435 | | student_data[0].into(), [INFO] [stdout] ... | [INFO] [stdout] 438 | | Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 439 | | ); [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 440 | record [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 432 ~ [INFO] [stdout] 433 ~ Record::new( [INFO] [stdout] 434 + student_data[3].to_string(), [INFO] [stdout] 435 + RecordData::CreateStudent( [INFO] [stdout] 436 + student_data[0].into(), [INFO] [stdout] 437 + student_data[1].parse::().unwrap(), [INFO] [stdout] 438 + ), [INFO] [stdout] 439 + Duration::from_millis(student_data[2].parse::().unwrap()), [INFO] [stdout] 440 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/block.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | return Vec::from(hasher.finalize().as_ref()); [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] 39 - return Vec::from(hasher.finalize().as_ref()); [INFO] [stdout] 39 + Vec::from(hasher.finalize().as_ref()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/block.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | / return self.hash.is_some() && [INFO] [stdout] 61 | | self.hash.as_ref().unwrap().eq(&byte_vector_to_string(&self.calculate_hash())); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 60 ~ self.hash.is_some() && [INFO] [stdout] 61 ~ self.hash.as_ref().unwrap().eq(&byte_vector_to_string(&self.calculate_hash())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain/block.rs:66:35 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn byte_vector_to_string(arr: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 66 - pub fn byte_vector_to_string(arr: &Vec) -> String { [INFO] [stdout] 66 + pub fn byte_vector_to_string(arr: &[u8]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/blockchain/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod blockchain; [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: this boolean expression can be simplified [INFO] [stdout] --> src/blockchain/blockchain.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !(block.prev_hash == self.get_last_block_hash()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(block.prev_hash != self.get_last_block_hash())` [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: useless use of `format!` [INFO] [stdout] --> src/blockchain/blockchain.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | let mut data = format!("Blockchain:\n\tPadron\tNota"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Blockchain:\n\tPadron\tNota".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/record.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / return match &self.record { [INFO] [stdout] 36 | | RecordData::CreateStudent(id, qualification) => { [INFO] [stdout] 37 | | world_state.create_student(id.into(), *qualification) [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | }; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 35 ~ match &self.record { [INFO] [stdout] 36 + RecordData::CreateStudent(id, qualification) => { [INFO] [stdout] 37 + world_state.create_student(id.into(), *qualification) [INFO] [stdout] 38 + } [INFO] [stdout] 39 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/record.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | return Vec::from(hasher.finalize().as_ref()); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return Vec::from(hasher.finalize().as_ref()); [INFO] [stdout] 48 + Vec::from(hasher.finalize().as_ref()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain/world_state.rs:10:45 [INFO] [stdout] | [INFO] [stdout] 10 | fn get_student_by_id_mut(&mut self, id: &String) -> Option<&mut Student>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain/world_state.rs:13:37 [INFO] [stdout] | [INFO] [stdout] 13 | fn get_student_by_id(&self, id: &String) -> Option<&Student>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/blockchain/world_state.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | self.students.keys().map(|s| s.clone()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.students.keys().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/world_state.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | return Ok(()); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 36 - return Ok(()); [INFO] [stdout] 36 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/world_state.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | return Err("Qualification must be between 1 and 10"); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 38 - return Err("Qualification must be between 1 and 10"); [INFO] [stdout] 38 + Err("Qualification must be between 1 and 10") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/blockchain/world_state.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | if qualification >= 1 && qualification <= 10 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=10).contains(&qualification)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/leader_discoverer.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn run(&mut self) -> () { [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: equality checks against true are unnecessary [INFO] [stdout] --> src/leader_discoverer.rs:65:16 [INFO] [stdout] | [INFO] [stdout] 65 | if *leader_found == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `*leader_found` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/leader_discoverer.rs:68:34 [INFO] [stdout] | [INFO] [stdout] 68 | self.logger.info(format!("TIMEOUT: Leader not found, I become leader")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"TIMEOUT: Leader not found, I become leader".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/leader_down_handler.rs:45:26 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn run(&mut self) -> () { [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: useless use of `format!` [INFO] [stdout] --> src/leader_down_handler.rs:68:26 [INFO] [stdout] | [INFO] [stdout] 68 | self.logger.info(format!("Running bully algorithm")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Running bully algorithm".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/leader_down_handler.rs:106:16 [INFO] [stdout] | [INFO] [stdout] 106 | if &addr != &*self.my_address.read().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 106 - if &addr != &*self.my_address.read().unwrap() { [INFO] [stdout] 106 + if addr != *self.my_address.read().unwrap() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/stdin_reader.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / pub fn new( [INFO] [stdout] 30 | | leader_condvar: Arc<(Mutex, Condvar)>, [INFO] [stdout] 31 | | socket: Socket, [INFO] [stdout] 32 | | leader_addr: Arc>>, [INFO] [stdout] ... | [INFO] [stdout] 38 | | blockchain_logger: Arc [INFO] [stdout] 39 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/stdin_reader.rs:66:16 [INFO] [stdout] | [INFO] [stdout] 66 | if &value == "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/stdin_reader.rs:69:16 [INFO] [stdout] | [INFO] [stdout] 69 | if &value == CLOSE { [INFO] [stdout] | ------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stdin_reader.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 131 | let line = iterator.next().unwrap().unwrap(); [INFO] [stdout] | --------------------------------------------- unnecessary `let` binding [INFO] [stdout] 132 | line [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 131 ~ [INFO] [stdout] 132 ~ iterator.next().unwrap().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/stdin_reader.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return line.to_string(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return line.to_string(); [INFO] [stdout] 145 + line.to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/stdin_reader.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return String::new(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return String::new(); [INFO] [stdout] 162 + String::new() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | return -1; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - return -1; [INFO] [stdout] 21 + -1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/encoder.rs:7:39 [INFO] [stdout] | [INFO] [stdout] 7 | let mut message = String::from(msg.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.38s [INFO] running `Command { std: "docker" "inspect" "6ffe9859b1310cdc8228a0ac14c9911c6a4ac77a961f4adb82e502e1daeb5512", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6ffe9859b1310cdc8228a0ac14c9911c6a4ac77a961f4adb82e502e1daeb5512", kill_on_drop: false }` [INFO] [stdout] 6ffe9859b1310cdc8228a0ac14c9911c6a4ac77a961f4adb82e502e1daeb5512