[INFO] cloning repository https://github.com/TateStaples/SatSwarm [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/TateStaples/SatSwarm" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTateStaples%2FSatSwarm", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTateStaples%2FSatSwarm'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 240ef3f108cd6ffe82b03e9ac3422860a083d741 [INFO] linting TateStaples/SatSwarm against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTateStaples%2FSatSwarm" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/TateStaples/SatSwarm [INFO] finished tweaking git repo https://github.com/TateStaples/SatSwarm [INFO] tweaked toml for git repo https://github.com/TateStaples/SatSwarm written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/TateStaples/SatSwarm 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/TateStaples/SatSwarm 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] Downloading crates ... [INFO] [stderr] Downloaded anyhow v1.0.97 [INFO] [stderr] Downloaded errno v0.3.10 [INFO] [stderr] Downloaded visibility v0.1.1 [INFO] [stderr] Downloaded cpu-time v1.0.0 [INFO] [stderr] Downloaded libloading v0.8.6 [INFO] [stderr] Downloaded csv-core v0.1.12 [INFO] [stderr] Downloaded rustsat-minisat v0.7.0 [INFO] [stderr] Downloaded prettyplease v0.2.32 [INFO] [stderr] Downloaded cc v1.2.18 [INFO] [stderr] Downloaded rustsat v0.7.0 [INFO] [stderr] Downloaded bindgen v0.71.1 [INFO] [stderr] Downloaded rustix v1.0.3 [INFO] [stderr] Downloaded linux-raw-sys v0.9.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] aaa5c01ee3a0ebea066b8294ff13a823d4d854c9e0b9d27e3d0b74e1eee64c94 [INFO] running `Command { std: "docker" "start" "-a" "aaa5c01ee3a0ebea066b8294ff13a823d4d854c9e0b9d27e3d0b74e1eee64c94", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aaa5c01ee3a0ebea066b8294ff13a823d4d854c9e0b9d27e3d0b74e1eee64c94", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aaa5c01ee3a0ebea066b8294ff13a823d4d854c9e0b9d27e3d0b74e1eee64c94", kill_on_drop: false }` [INFO] [stdout] aaa5c01ee3a0ebea066b8294ff13a823d4d854c9e0b9d27e3d0b74e1eee64c94 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 34547bbd59b4bc0a39d6aab6527144b08d07e562c490fab1bee23a494cde26cc [INFO] running `Command { std: "docker" "start" "-a" "34547bbd59b4bc0a39d6aab6527144b08d07e562c490fab1bee23a494cde26cc", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.94 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling libc v0.2.171 [INFO] [stderr] Compiling glob v0.3.2 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Compiling prettyplease v0.2.32 [INFO] [stderr] Compiling minimal-lexical v0.2.1 [INFO] [stderr] Compiling memchr v2.7.4 [INFO] [stderr] Compiling shlex v1.3.0 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Compiling rustix v1.0.3 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Compiling bindgen v0.71.1 [INFO] [stderr] Compiling zerocopy v0.8.24 [INFO] [stderr] Compiling libloading v0.8.6 [INFO] [stderr] Compiling cc v1.2.18 [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Compiling rustc-hash v2.1.1 [INFO] [stderr] Compiling bitflags v2.9.0 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Checking linux-raw-sys v0.9.3 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling itertools v0.13.0 [INFO] [stderr] Compiling anyhow v1.0.97 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Checking fastrand v2.3.0 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking csv-core v0.1.12 [INFO] [stderr] Checking ryu v1.0.20 [INFO] [stderr] Checking itoa v1.0.15 [INFO] [stderr] Checking cpu-time v1.0.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.0 [INFO] [stderr] Checking tempfile v3.19.1 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling visibility v0.1.1 [INFO] [stderr] Checking rustsat v0.7.0 [INFO] [stderr] Compiling rustsat-minisat v0.7.0 [INFO] [stderr] Checking sat_swarm v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/structures/clause_table.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | num_clauses: num_clauses, // Initialize the number of clauses [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num_clauses` [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/structures/clause_table.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | num_clauses: num_clauses, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num_clauses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/structures/clause_table.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | num_clauses: num_clauses, // Initialize the number of clauses [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num_clauses` [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/structures/clause_table.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | num_clauses: num_clauses, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num_clauses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty doc comment [INFO] [stdout] --> src/structures/node.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | /// [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing or filling it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs [INFO] [stdout] = note: `#[warn(clippy::empty_docs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:114:33 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn busy(&self) -> bool {return self.state != NodeState::AwaitingFork} [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] 114 - pub fn busy(&self) -> bool {return self.state != NodeState::AwaitingFork} [INFO] [stdout] 114 + pub fn busy(&self) -> bool {self.state != NodeState::AwaitingFork} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | ... return self.assignment_time.iter().position(|x| *x == SpeculativeDepth::Unassigned) // For now get the index of the first una... [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] 118 - return self.assignment_time.iter().position(|x| *x == SpeculativeDepth::Unassigned) // For now get the index of the first unassigned variable [INFO] [stdout] 118 + self.assignment_time.iter().position(|x| *x == SpeculativeDepth::Unassigned) // For now get the index of the first unassigned variable [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return max; [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] 134 - return max; [INFO] [stdout] 134 + max [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/structures/node.rs:127:21 [INFO] [stdout] | [INFO] [stdout] 127 | / if *depth > max { [INFO] [stdout] 128 | | max = *depth; [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 126 ~ SpeculativeDepth::Depth(depth, _) [INFO] [stdout] 127 ~ if *depth > max => { [INFO] [stdout] 128 | max = *depth; [INFO] [stdout] 129 ~ }, [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/structures/node.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | / match var { [INFO] [stdout] 126 | | SpeculativeDepth::Depth(depth, _) => { [INFO] [stdout] 127 | | if *depth > max { [INFO] [stdout] 128 | | max = *depth; [INFO] [stdout] ... | [INFO] [stdout] 131 | | _ => {} [INFO] [stdout] 132 | | } [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] 125 ~ if let SpeculativeDepth::Depth(depth, _) = var { [INFO] [stdout] 126 + if *depth > max { [INFO] [stdout] 127 + max = *depth; [INFO] [stdout] 128 + } [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/structures/node.rs:138:19 [INFO] [stdout] | [INFO] [stdout] 138 | let msg = std::mem::replace(&mut self.incoming_message, None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.incoming_message.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/structures/node.rs:198:78 [INFO] [stdout] | [INFO] [stdout] 198 | fn branch(&mut self, clock: u64, network: &mut MessageQueue, busy_nodes: &mut Vec) { [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] 198 - fn branch(&mut self, clock: u64, network: &mut MessageQueue, busy_nodes: &mut Vec) { [INFO] [stdout] 198 + fn branch(&mut self, clock: u64, network: &mut MessageQueue, busy_nodes: &mut [bool]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/structures/node.rs:219:85 [INFO] [stdout] | [INFO] [stdout] 219 | if let Some(neighbor_id) = self.neighbors.iter().find(|&&n| !busy_nodes[n as usize]) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/structures/node.rs:224:28 [INFO] [stdout] | [INFO] [stdout] 224 | busy_nodes[*neighbor_id as usize] = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(*neighbor_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/structures/node.rs:288:49 [INFO] [stdout] | [INFO] [stdout] 288 | fn mask(table: &ClauseTable, update_buffer: &mut Vec, var_update: &VarUpdate) -> [TermUpdate; CLAUSE_LENGTH] { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 288 - fn mask(table: &ClauseTable, update_buffer: &mut Vec, var_update: &VarUpdate) -> [TermUpdate; CLAUSE_LENGTH] { [INFO] [stdout] 288 + fn mask(table: &ClauseTable, update_buffer: &mut [SpeculativeDepth], var_update: &VarUpdate) -> [TermUpdate; CLAUSE_LENGTH] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structures/node.rs:292:24 [INFO] [stdout] | [INFO] [stdout] 292 | if *negated == !var_update.assignment { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*negated != var_update.assignment` [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: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:355:9 [INFO] [stdout] | [INFO] [stdout] 355 | return true; [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] 355 - return true; [INFO] [stdout] 355 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/structures/message.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | UnfinishedMessage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/message.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | return clock - self.last_update > self.timeout; [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] 52 - return clock - self.last_update > self.timeout; [INFO] [stdout] 52 + clock - self.last_update > self.timeout [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/message.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | return result; [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] 62 - return result; [INFO] [stdout] 62 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/structures/message.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | let result = if self.peek(clock) { [INFO] [stdout] | ______________________^ [INFO] [stdout] 57 | | true [INFO] [stdout] 58 | | } else { [INFO] [stdout] 59 | | false [INFO] [stdout] 60 | | }; [INFO] [stdout] | |_________^ help: you can reduce it to: `self.peek(clock)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/structures/message.rs:117:21 [INFO] [stdout] | [INFO] [stdout] 117 | ... let delay = match message { [INFO] [stdout] | ___________________^ [INFO] [stdout] 118 | | ... // Message::Fork {..} => (std::mem::size_of::() + std::mem::size_of::() - 1) / self.bandwidth + 1, [INFO] [stdout] 119 | | ... // TODO: if we think that the size of the message is less than can be processed in a clock cycle we can just set the de... [INFO] [stdout] 120 | | ... _ => 1, [INFO] [stdout] 121 | | ... }; [INFO] [stdout] | |_______^ help: consider using the match body instead: `1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/message.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return result; [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] 134 - return result; [INFO] [stdout] 134 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/structures/clause_table.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | impl Default for TermState {fn default() -> Self {TermState::Symbolic}} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 17 + #[derive(Default)] [INFO] [stdout] 18 ~ pub enum TermState {False, True, #[default] [INFO] [stdout] 19 | Symbolic} // True is not needed since the clause is satisfied when any term is true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/structures/clause_table.rs:31:69 [INFO] [stdout] | [INFO] [stdout] 31 | clause_table: vec![[Default::default(); CLAUSE_LENGTH]; num_clauses as usize], // Initialize the clause table with 0s [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `num_clauses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `clause` [INFO] [stdout] --> src/structures/clause_table.rs:41:22 [INFO] [stdout] | [INFO] [stdout] 41 | for i in 0..CLAUSE_LENGTH { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 41 - for i in 0..CLAUSE_LENGTH { [INFO] [stdout] 41 + for in clause.iter_mut().take(CLAUSE_LENGTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `clause` [INFO] [stdout] --> src/structures/clause_table.rs:102:34 [INFO] [stdout] | [INFO] [stdout] 102 | for i in term_index..CLAUSE_LENGTH { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 102 - for i in term_index..CLAUSE_LENGTH { [INFO] [stdout] 102 + for in clause.iter_mut().take(CLAUSE_LENGTH).skip(term_index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u8 [INFO] [stdout] --> src/structures/clause_table.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | ... clause[term_index] = (Term{var: num.abs() as u8, negated: num < 0}, TermState::Symbolic); // want to 0 index the variables [INFO] [stdout] | ^^^^^^^^^ help: replace with: `num.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/structures/clause_table.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | for clause in &self.clause_table { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, clause) in self.clause_table.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty doc comment [INFO] [stdout] --> src/structures/node.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | /// [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing or filling it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs [INFO] [stdout] = note: `#[warn(clippy::empty_docs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:114:33 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn busy(&self) -> bool {return self.state != NodeState::AwaitingFork} [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] 114 - pub fn busy(&self) -> bool {return self.state != NodeState::AwaitingFork} [INFO] [stdout] 114 + pub fn busy(&self) -> bool {self.state != NodeState::AwaitingFork} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | ... return self.assignment_time.iter().position(|x| *x == SpeculativeDepth::Unassigned) // For now get the index of the first una... [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] 118 - return self.assignment_time.iter().position(|x| *x == SpeculativeDepth::Unassigned) // For now get the index of the first unassigned variable [INFO] [stdout] 118 + self.assignment_time.iter().position(|x| *x == SpeculativeDepth::Unassigned) // For now get the index of the first unassigned variable [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return max; [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] 134 - return max; [INFO] [stdout] 134 + max [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/structures/node.rs:127:21 [INFO] [stdout] | [INFO] [stdout] 127 | / if *depth > max { [INFO] [stdout] 128 | | max = *depth; [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 126 ~ SpeculativeDepth::Depth(depth, _) [INFO] [stdout] 127 ~ if *depth > max => { [INFO] [stdout] 128 | max = *depth; [INFO] [stdout] 129 ~ }, [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/structures/node.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | / match var { [INFO] [stdout] 126 | | SpeculativeDepth::Depth(depth, _) => { [INFO] [stdout] 127 | | if *depth > max { [INFO] [stdout] 128 | | max = *depth; [INFO] [stdout] ... | [INFO] [stdout] 131 | | _ => {} [INFO] [stdout] 132 | | } [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] 125 ~ if let SpeculativeDepth::Depth(depth, _) = var { [INFO] [stdout] 126 + if *depth > max { [INFO] [stdout] 127 + max = *depth; [INFO] [stdout] 128 + } [INFO] [stdout] 129 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/structures/node.rs:138:19 [INFO] [stdout] | [INFO] [stdout] 138 | let msg = std::mem::replace(&mut self.incoming_message, None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.incoming_message.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/structures/node.rs:198:78 [INFO] [stdout] | [INFO] [stdout] 198 | fn branch(&mut self, clock: u64, network: &mut MessageQueue, busy_nodes: &mut Vec) { [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] 198 - fn branch(&mut self, clock: u64, network: &mut MessageQueue, busy_nodes: &mut Vec) { [INFO] [stdout] 198 + fn branch(&mut self, clock: u64, network: &mut MessageQueue, busy_nodes: &mut [bool]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/structures/node.rs:219:85 [INFO] [stdout] | [INFO] [stdout] 219 | if let Some(neighbor_id) = self.neighbors.iter().find(|&&n| !busy_nodes[n as usize]) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/structures/node.rs:224:28 [INFO] [stdout] | [INFO] [stdout] 224 | busy_nodes[*neighbor_id as usize] = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(*neighbor_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/structures/satswarm.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 142 | if clock % 100_000 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `clock.is_multiple_of(100_000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/structures/node.rs:288:49 [INFO] [stdout] | [INFO] [stdout] 288 | fn mask(table: &ClauseTable, update_buffer: &mut Vec, var_update: &VarUpdate) -> [TermUpdate; CLAUSE_LENGTH] { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 288 - fn mask(table: &ClauseTable, update_buffer: &mut Vec, var_update: &VarUpdate) -> [TermUpdate; CLAUSE_LENGTH] { [INFO] [stdout] 288 + fn mask(table: &ClauseTable, update_buffer: &mut [SpeculativeDepth], var_update: &VarUpdate) -> [TermUpdate; CLAUSE_LENGTH] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structures/node.rs:292:24 [INFO] [stdout] | [INFO] [stdout] 292 | if *negated == !var_update.assignment { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*negated != var_update.assignment` [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: unneeded `return` statement [INFO] [stdout] --> src/structures/node.rs:355:9 [INFO] [stdout] | [INFO] [stdout] 355 | return true; [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] 355 - return true; [INFO] [stdout] 355 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> src/structures/satswarm.rs:218:33 [INFO] [stdout] | [INFO] [stdout] 218 | / ... let term_str = match term { [INFO] [stdout] 219 | | ... Term {var, negated} => { [INFO] [stdout] 220 | | ... let val = match model.get(var) { [INFO] [stdout] 221 | | ... Some(val) => val, [INFO] [stdout] ... | [INFO] [stdout] 247 | | ... }; [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 218 ~ let Term {var, negated} = term; [INFO] [stdout] 219 + let term_str = { [INFO] [stdout] 220 + let val = match model.get(var) { [INFO] [stdout] 221 + Some(val) => val, [INFO] [stdout] 222 + None => panic!("Variable {} not found in model", var) [INFO] [stdout] 223 + }; [INFO] [stdout] 224 + let term_val = if *negated { !val } else { *val }; [INFO] [stdout] 225 + if term_val { [INFO] [stdout] 226 + found_true = true; [INFO] [stdout] 227 + } [INFO] [stdout] 228 + match term_state { [INFO] [stdout] 229 + TermState::True => { [INFO] [stdout] 230 + assert!(term_val, "Term {:?} is not consistent with term state {:?}", term, term_state); [INFO] [stdout] 231 + }, [INFO] [stdout] 232 + TermState::False => { [INFO] [stdout] 233 + assert!(!term_val, "Term {:?} is not consistent with term state {:?}", term, term_state); [INFO] [stdout] 234 + }, [INFO] [stdout] 235 + TermState::Symbolic => { [INFO] [stdout] 236 + } [INFO] [stdout] 237 + [INFO] [stdout] 238 + } [INFO] [stdout] 239 + // assert!(if term_val { *term_state == TermState::True } else { *term_state == TermState::False }, "{:?} is not consistent with term state {:?}", term, term_state); [INFO] [stdout] 240 + [INFO] [stdout] 241 + if *negated { [INFO] [stdout] 242 + format!("!{} ({})", var, !val) [INFO] [stdout] 243 + } else { [INFO] [stdout] 244 + format!("{} ({})", var, val) [INFO] [stdout] 245 + } [INFO] [stdout] 246 + }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/structures/message.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | UnfinishedMessage, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/message.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | return clock - self.last_update > self.timeout; [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] 52 - return clock - self.last_update > self.timeout; [INFO] [stdout] 52 + clock - self.last_update > self.timeout [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/message.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | return result; [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] 62 - return result; [INFO] [stdout] 62 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/structures/message.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | let result = if self.peek(clock) { [INFO] [stdout] | ______________________^ [INFO] [stdout] 57 | | true [INFO] [stdout] 58 | | } else { [INFO] [stdout] 59 | | false [INFO] [stdout] 60 | | }; [INFO] [stdout] | |_________^ help: you can reduce it to: `self.peek(clock)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/main.rs:131:36 [INFO] [stdout] | [INFO] [stdout] 131 | "dense" => Topology::Dense(num_nodes as usize), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `num_nodes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/structures/message.rs:117:21 [INFO] [stdout] | [INFO] [stdout] 117 | ... let delay = match message { [INFO] [stdout] | ___________________^ [INFO] [stdout] 118 | | ... // Message::Fork {..} => (std::mem::size_of::() + std::mem::size_of::() - 1) / self.bandwidth + 1, [INFO] [stdout] 119 | | ... // TODO: if we think that the size of the message is less than can be processed in a clock cycle we can just set the de... [INFO] [stdout] 120 | | ... _ => 1, [INFO] [stdout] 121 | | ... }; [INFO] [stdout] | |_______^ help: consider using the match body instead: `1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structures/message.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return result; [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] 134 - return result; [INFO] [stdout] 134 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/main.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | / for entry in entries { [INFO] [stdout] 171 | | if let Ok(entry) = entry { [INFO] [stdout] 172 | | let path = entry.path(); [INFO] [stdout] 173 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 180 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/main.rs:171:17 [INFO] [stdout] | [INFO] [stdout] 171 | / if let Ok(entry) = entry { [INFO] [stdout] 172 | | let path = entry.path(); [INFO] [stdout] 173 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 179 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 ~ for entry in entries.flatten() { [INFO] [stdout] 171 + let path = entry.path(); [INFO] [stdout] 172 + if path.is_file() { [INFO] [stdout] 173 + // println!("Found test file: {:?}", path); [INFO] [stdout] 174 + files.push(path); [INFO] [stdout] 175 + } else if path.is_dir() { [INFO] [stdout] 176 + collect_files(&path, files); [INFO] [stdout] 177 + } [INFO] [stdout] 178 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/main.rs:216:21 [INFO] [stdout] | [INFO] [stdout] 216 | let test_name = config.test_dir.split('/').last().unwrap_or("unknown"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 216 - let test_name = config.test_dir.split('/').last().unwrap_or("unknown"); [INFO] [stdout] 216 + let test_name = config.test_dir.split('/').next_back().unwrap_or("unknown"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/structures/clause_table.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | impl Default for TermState {fn default() -> Self {TermState::Symbolic}} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 17 + #[derive(Default)] [INFO] [stdout] 18 ~ pub enum TermState {False, True, #[default] [INFO] [stdout] 19 | Symbolic} // True is not needed since the clause is satisfied when any term is true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/structures/clause_table.rs:31:69 [INFO] [stdout] | [INFO] [stdout] 31 | clause_table: vec![[Default::default(); CLAUSE_LENGTH]; num_clauses as usize], // Initialize the clause table with 0s [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `num_clauses` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `clause` [INFO] [stdout] --> src/structures/clause_table.rs:41:22 [INFO] [stdout] | [INFO] [stdout] 41 | for i in 0..CLAUSE_LENGTH { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 41 - for i in 0..CLAUSE_LENGTH { [INFO] [stdout] 41 + for in clause.iter_mut().take(CLAUSE_LENGTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:244:53 [INFO] [stdout] | [INFO] [stdout] 244 | if let Err(e) = writer.write_record(&[ [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 245 | | "Test Path", [INFO] [stdout] 246 | | "Expected Result", [INFO] [stdout] 247 | | "Minisat Speed (ns)", [INFO] [stdout] ... | [INFO] [stdout] 255 | | "Number of Variables" [INFO] [stdout] 256 | | ]) { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 244 ~ if let Err(e) = writer.write_record([ [INFO] [stdout] 245 + "Test Path", [INFO] [stdout] 246 + "Expected Result", [INFO] [stdout] 247 + "Minisat Speed (ns)", [INFO] [stdout] 248 + "Simulated Result", [INFO] [stdout] 249 + "Simulated Cycles", [INFO] [stdout] 250 + "Cycles Busy", [INFO] [stdout] 251 + "Cycles Idle", [INFO] [stdout] 252 + "Num Nodes", [INFO] [stdout] 253 + "Topology", [INFO] [stdout] 254 + "Node Bandwidth", [INFO] [stdout] 255 + "Number of Variables" [INFO] [stdout] 256 ~ ]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `clause` [INFO] [stdout] --> src/structures/clause_table.rs:102:34 [INFO] [stdout] | [INFO] [stdout] 102 | for i in term_index..CLAUSE_LENGTH { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 102 - for i in term_index..CLAUSE_LENGTH { [INFO] [stdout] 102 + for in clause.iter_mut().take(CLAUSE_LENGTH).skip(term_index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u8 [INFO] [stdout] --> src/structures/clause_table.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | ... clause[term_index] = (Term{var: num.abs() as u8, negated: num < 0}, TermState::Symbolic); // want to 0 index the variables [INFO] [stdout] | ^^^^^^^^^ help: replace with: `num.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/structures/clause_table.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | for clause in &self.clause_table { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, clause) in self.clause_table.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/structures/satswarm.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 142 | if clock % 100_000 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `clock.is_multiple_of(100_000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> src/structures/satswarm.rs:218:33 [INFO] [stdout] | [INFO] [stdout] 218 | / ... let term_str = match term { [INFO] [stdout] 219 | | ... Term {var, negated} => { [INFO] [stdout] 220 | | ... let val = match model.get(var) { [INFO] [stdout] 221 | | ... Some(val) => val, [INFO] [stdout] ... | [INFO] [stdout] 247 | | ... }; [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 218 ~ let Term {var, negated} = term; [INFO] [stdout] 219 + let term_str = { [INFO] [stdout] 220 + let val = match model.get(var) { [INFO] [stdout] 221 + Some(val) => val, [INFO] [stdout] 222 + None => panic!("Variable {} not found in model", var) [INFO] [stdout] 223 + }; [INFO] [stdout] 224 + let term_val = if *negated { !val } else { *val }; [INFO] [stdout] 225 + if term_val { [INFO] [stdout] 226 + found_true = true; [INFO] [stdout] 227 + } [INFO] [stdout] 228 + match term_state { [INFO] [stdout] 229 + TermState::True => { [INFO] [stdout] 230 + assert!(term_val, "Term {:?} is not consistent with term state {:?}", term, term_state); [INFO] [stdout] 231 + }, [INFO] [stdout] 232 + TermState::False => { [INFO] [stdout] 233 + assert!(!term_val, "Term {:?} is not consistent with term state {:?}", term, term_state); [INFO] [stdout] 234 + }, [INFO] [stdout] 235 + TermState::Symbolic => { [INFO] [stdout] 236 + } [INFO] [stdout] 237 + [INFO] [stdout] 238 + } [INFO] [stdout] 239 + // assert!(if term_val { *term_state == TermState::True } else { *term_state == TermState::False }, "{:?} is not consistent with term state {:?}", term, term_state); [INFO] [stdout] 240 + [INFO] [stdout] 241 + if *negated { [INFO] [stdout] 242 + format!("!{} ({})", var, !val) [INFO] [stdout] 243 + } else { [INFO] [stdout] 244 + format!("{} ({})", var, val) [INFO] [stdout] 245 + } [INFO] [stdout] 246 + }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/main.rs:131:36 [INFO] [stdout] | [INFO] [stdout] 131 | "dense" => Topology::Dense(num_nodes as usize), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `num_nodes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/main.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | / for entry in entries { [INFO] [stdout] 171 | | if let Ok(entry) = entry { [INFO] [stdout] 172 | | let path = entry.path(); [INFO] [stdout] 173 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 180 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/main.rs:171:17 [INFO] [stdout] | [INFO] [stdout] 171 | / if let Ok(entry) = entry { [INFO] [stdout] 172 | | let path = entry.path(); [INFO] [stdout] 173 | | if path.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 179 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 ~ for entry in entries.flatten() { [INFO] [stdout] 171 + let path = entry.path(); [INFO] [stdout] 172 + if path.is_file() { [INFO] [stdout] 173 + // println!("Found test file: {:?}", path); [INFO] [stdout] 174 + files.push(path); [INFO] [stdout] 175 + } else if path.is_dir() { [INFO] [stdout] 176 + collect_files(&path, files); [INFO] [stdout] 177 + } [INFO] [stdout] 178 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/main.rs:216:21 [INFO] [stdout] | [INFO] [stdout] 216 | let test_name = config.test_dir.split('/').last().unwrap_or("unknown"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 216 - let test_name = config.test_dir.split('/').last().unwrap_or("unknown"); [INFO] [stdout] 216 + let test_name = config.test_dir.split('/').next_back().unwrap_or("unknown"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:244:53 [INFO] [stdout] | [INFO] [stdout] 244 | if let Err(e) = writer.write_record(&[ [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 245 | | "Test Path", [INFO] [stdout] 246 | | "Expected Result", [INFO] [stdout] 247 | | "Minisat Speed (ns)", [INFO] [stdout] ... | [INFO] [stdout] 255 | | "Number of Variables" [INFO] [stdout] 256 | | ]) { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 244 ~ if let Err(e) = writer.write_record([ [INFO] [stdout] 245 + "Test Path", [INFO] [stdout] 246 + "Expected Result", [INFO] [stdout] 247 + "Minisat Speed (ns)", [INFO] [stdout] 248 + "Simulated Result", [INFO] [stdout] 249 + "Simulated Cycles", [INFO] [stdout] 250 + "Cycles Busy", [INFO] [stdout] 251 + "Cycles Idle", [INFO] [stdout] 252 + "Num Nodes", [INFO] [stdout] 253 + "Topology", [INFO] [stdout] 254 + "Node Bandwidth", [INFO] [stdout] 255 + "Number of Variables" [INFO] [stdout] 256 ~ ]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 37.17s [INFO] running `Command { std: "docker" "inspect" "34547bbd59b4bc0a39d6aab6527144b08d07e562c490fab1bee23a494cde26cc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "34547bbd59b4bc0a39d6aab6527144b08d07e562c490fab1bee23a494cde26cc", kill_on_drop: false }` [INFO] [stdout] 34547bbd59b4bc0a39d6aab6527144b08d07e562c490fab1bee23a494cde26cc