[INFO] cloning repository https://github.com/CrownedPhoenix/turing-machine-solver [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CrownedPhoenix/turing-machine-solver" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCrownedPhoenix%2Fturing-machine-solver", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCrownedPhoenix%2Fturing-machine-solver'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 705eb425409616ae6dcac8b2179537e12deb2953 [INFO] linting CrownedPhoenix/turing-machine-solver against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCrownedPhoenix%2Fturing-machine-solver" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/CrownedPhoenix/turing-machine-solver [INFO] finished tweaking git repo https://github.com/CrownedPhoenix/turing-machine-solver [INFO] tweaked toml for git repo https://github.com/CrownedPhoenix/turing-machine-solver written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/CrownedPhoenix/turing-machine-solver 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/CrownedPhoenix/turing-machine-solver 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] Downloading crates ... [INFO] [stderr] Downloaded anstyle-wincon v3.0.9 [INFO] [stderr] Downloaded anstyle-query v1.1.3 [INFO] [stderr] Downloaded anstream v0.6.19 [INFO] [stderr] Downloaded jiff-static v0.2.15 [INFO] [stderr] Downloaded clap_derive v4.5.40 [INFO] [stderr] Downloaded clap v4.5.40 [INFO] [stderr] Downloaded clap_builder v4.5.40 [INFO] [stderr] Downloaded jiff v0.2.15 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] e75e5bf9caf067bdde4a22ce21a0cc47c5ed990acce7588e3753f211202392a5 [INFO] running `Command { std: "docker" "start" "-a" "e75e5bf9caf067bdde4a22ce21a0cc47c5ed990acce7588e3753f211202392a5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e75e5bf9caf067bdde4a22ce21a0cc47c5ed990acce7588e3753f211202392a5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e75e5bf9caf067bdde4a22ce21a0cc47c5ed990acce7588e3753f211202392a5", kill_on_drop: false }` [INFO] [stdout] e75e5bf9caf067bdde4a22ce21a0cc47c5ed990acce7588e3753f211202392a5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 3f1d0041dd79c25d782d7e23fddf102be38a4d3a7ccb52efeeba99167709622e [INFO] running `Command { std: "docker" "start" "-a" "3f1d0041dd79c25d782d7e23fddf102be38a4d3a7ccb52efeeba99167709622e", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking is_terminal_polyfill v1.70.1 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Checking jiff v0.2.15 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Checking clap_builder v4.5.40 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.102 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking env_filter v0.1.3 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Compiling clap_derive v4.5.40 [INFO] [stderr] Checking clap v4.5.40 [INFO] [stderr] Checking turing-solve v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/guess_sequence/decision.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | guesses: guesses, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `guesses` [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/guess_sequence/decision.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | current_guess: current_guess, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_guess` [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/guess_sequence/decision.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | guesses: guesses, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `guesses` [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/guess_sequence/decision.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | current_guess: current_guess, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_guess` [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/guess_sequence/solver.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | roots: roots, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `roots` [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/guess_sequence/solver.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | roots: roots, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `roots` [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/guess_sequence/solver.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | decisions: decisions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `decisions` [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/guess_sequence/solver.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | decisions: decisions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `decisions` [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/solver.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | constraints: constraints, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `constraints` [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/solver.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | constraints: constraints, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `constraints` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/guess_sequence/decision.rs:26:32 [INFO] [stdout] | [INFO] [stdout] 26 | let solutions = shrink(&available_solutions, &guesses); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `available_solutions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/guess_sequence/decision_tree.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | .unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/guess_sequence/decision_tree.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | if children.is_empty() && decision.solution == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `decision.solution.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/guess_sequence/solver.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | / return Some(DecisionTree { [INFO] [stdout] 104 | | roots: roots, [INFO] [stdout] 105 | | decisions: decisions, [INFO] [stdout] 106 | | }); [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] 103 ~ Some(DecisionTree { [INFO] [stdout] 104 + roots: roots, [INFO] [stdout] 105 + decisions: decisions, [INFO] [stdout] 106 ~ }) [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/guess_sequence/solver.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn guess_sequence(solutions: &Vec) -> Option { [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] 12 - pub fn guess_sequence(solutions: &Vec) -> Option { [INFO] [stdout] 12 + pub fn guess_sequence(solutions: &[Solution]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/guess_sequence/solver.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / let Some(first_best_guess) = best_guess( [INFO] [stdout] 23 | | &relevant_constraints, [INFO] [stdout] 24 | | &solutions.iter().map(|s| s).collect_vec(), [INFO] [stdout] 25 | | ) else { [INFO] [stdout] 26 | | return None [INFO] [stdout] 27 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] help: replace it with [INFO] [stdout] | [INFO] [stdout] 22 ~ let first_best_guess = best_guess( [INFO] [stdout] 23 + &relevant_constraints, [INFO] [stdout] 24 + &solutions.iter().map(|s| s).collect_vec(), [INFO] [stdout] 25 + )?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/guess_sequence/solver.rs:24:26 [INFO] [stdout] | [INFO] [stdout] 24 | &solutions.iter().map(|s| s).collect_vec(), [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/guess_sequence/solver.rs:29:63 [INFO] [stdout] | [INFO] [stdout] 29 | let available_solutions: Vec<&Solution> = solutions.iter().map(|s| s).collect_vec(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/guess_sequence/solver.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | if decision.solution != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `decision.solution.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/guess_sequence/solver.rs:66:59 [INFO] [stdout] | [INFO] [stdout] 66 | let remaining_constraints: HashSet<&Constraint> = relevant_constraints [INFO] [stdout] | ___________________________________________________________^ [INFO] [stdout] 67 | | .iter() [INFO] [stdout] 68 | | .filter(|&&c| c != decision.current_guess.constraint) [INFO] [stdout] 69 | | .map(|c| *c) [INFO] [stdout] | |________________________^ [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] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 66 ~ let remaining_constraints: HashSet<&Constraint> = relevant_constraints [INFO] [stdout] 67 + .iter() [INFO] [stdout] 68 + .filter(|&&c| c != decision.current_guess.constraint).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/guess_sequence/solver.rs:73:33 [INFO] [stdout] | [INFO] [stdout] 73 | decision.guesses.iter().copied().collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/guess_sequence/solver.rs:82:33 [INFO] [stdout] | [INFO] [stdout] 82 | decision.guesses.iter().copied().collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/guess_sequence/solver.rs:135:22 [INFO] [stdout] | [INFO] [stdout] 135 | let best_guess = available_constraints [INFO] [stdout] | ______________________^ [INFO] [stdout] 136 | | .iter() [INFO] [stdout] 137 | | .min_by(|&&c1, &&c2| { [INFO] [stdout] 138 | | tf_difference(c1, possible_solutions).cmp(&tf_difference(c2, possible_solutions)) [INFO] [stdout] 139 | | }) [INFO] [stdout] 140 | | .map(|g| *g); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 135 ~ let best_guess = available_constraints [INFO] [stdout] 136 + .iter() [INFO] [stdout] 137 + .min_by(|&&c1, &&c2| { [INFO] [stdout] 138 + tf_difference(c1, possible_solutions).cmp(&tf_difference(c2, possible_solutions)) [INFO] [stdout] 139 ~ }).copied(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/guess_sequence/solver.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | / available_solutions [INFO] [stdout] 160 | | .iter() [INFO] [stdout] 161 | | .filter(|&&solution| { [INFO] [stdout] 162 | | guess_sequence.iter().all(|&guess| { [INFO] [stdout] ... | [INFO] [stdout] 169 | | }) [INFO] [stdout] 170 | | .map(|s| *s) [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 159 ~ available_solutions [INFO] [stdout] 160 + .iter() [INFO] [stdout] 161 + .filter(|&&solution| { [INFO] [stdout] 162 + guess_sequence.iter().all(|&guess| { [INFO] [stdout] 163 + if guess.verified { [INFO] [stdout] 164 + solution.constraints.contains(guess.constraint) [INFO] [stdout] 165 + } else { [INFO] [stdout] 166 + !solution.constraints.contains(guess.constraint) [INFO] [stdout] 167 + } [INFO] [stdout] 168 + }) [INFO] [stdout] 169 + }).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scenario/card.rs:15:50 [INFO] [stdout] | [INFO] [stdout] 15 | fn new(num: u8, constraints: [(&'static str, fn(&Code) -> bool); N]) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/scenario/card.rs:25:27 [INFO] [stdout] | [INFO] [stdout] 25 | name: *name, [INFO] [stdout] | ^^^^^ help: try: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:197:53 [INFO] [stdout] | [INFO] [stdout] 197 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:200:53 [INFO] [stdout] | [INFO] [stdout] 200 | code.iter().filter(|n: &u8| *n % 2 != 0).count() == 2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `!(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:208:53 [INFO] [stdout] | [INFO] [stdout] 208 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 0 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:211:53 [INFO] [stdout] | [INFO] [stdout] 211 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 1 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:214:53 [INFO] [stdout] | [INFO] [stdout] 214 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:217:53 [INFO] [stdout] | [INFO] [stdout] 217 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 3 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/guess_sequence/decision.rs:26:32 [INFO] [stdout] | [INFO] [stdout] 26 | let solutions = shrink(&available_solutions, &guesses); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `available_solutions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/scenario/card.rs:308:66 [INFO] [stdout] | [INFO] [stdout] 308 | code.iter().tuple_windows().all(|(a, b)| !(a < b)) [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [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: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/guess_sequence/decision_tree.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | .unwrap_or(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/guess_sequence/decision_tree.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | if children.is_empty() && decision.solution == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `decision.solution.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/guess_sequence/solver.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | / return Some(DecisionTree { [INFO] [stdout] 104 | | roots: roots, [INFO] [stdout] 105 | | decisions: decisions, [INFO] [stdout] 106 | | }); [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] 103 ~ Some(DecisionTree { [INFO] [stdout] 104 + roots: roots, [INFO] [stdout] 105 + decisions: decisions, [INFO] [stdout] 106 ~ }) [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/guess_sequence/solver.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn guess_sequence(solutions: &Vec) -> Option { [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] 12 - pub fn guess_sequence(solutions: &Vec) -> Option { [INFO] [stdout] 12 + pub fn guess_sequence(solutions: &[Solution]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/guess_sequence/solver.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / let Some(first_best_guess) = best_guess( [INFO] [stdout] 23 | | &relevant_constraints, [INFO] [stdout] 24 | | &solutions.iter().map(|s| s).collect_vec(), [INFO] [stdout] 25 | | ) else { [INFO] [stdout] 26 | | return None [INFO] [stdout] 27 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] help: replace it with [INFO] [stdout] | [INFO] [stdout] 22 ~ let first_best_guess = best_guess( [INFO] [stdout] 23 + &relevant_constraints, [INFO] [stdout] 24 + &solutions.iter().map(|s| s).collect_vec(), [INFO] [stdout] 25 + )?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/guess_sequence/solver.rs:24:26 [INFO] [stdout] | [INFO] [stdout] 24 | &solutions.iter().map(|s| s).collect_vec(), [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/guess_sequence/solver.rs:29:63 [INFO] [stdout] | [INFO] [stdout] 29 | let available_solutions: Vec<&Solution> = solutions.iter().map(|s| s).collect_vec(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/guess_sequence/solver.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | if decision.solution != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `decision.solution.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/guess_sequence/solver.rs:66:59 [INFO] [stdout] | [INFO] [stdout] 66 | let remaining_constraints: HashSet<&Constraint> = relevant_constraints [INFO] [stdout] | ___________________________________________________________^ [INFO] [stdout] 67 | | .iter() [INFO] [stdout] 68 | | .filter(|&&c| c != decision.current_guess.constraint) [INFO] [stdout] 69 | | .map(|c| *c) [INFO] [stdout] | |________________________^ [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] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 66 ~ let remaining_constraints: HashSet<&Constraint> = relevant_constraints [INFO] [stdout] 67 + .iter() [INFO] [stdout] 68 + .filter(|&&c| c != decision.current_guess.constraint).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/guess_sequence/solver.rs:73:33 [INFO] [stdout] | [INFO] [stdout] 73 | decision.guesses.iter().copied().collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/guess_sequence/solver.rs:82:33 [INFO] [stdout] | [INFO] [stdout] 82 | decision.guesses.iter().copied().collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/guess_sequence/solver.rs:135:22 [INFO] [stdout] | [INFO] [stdout] 135 | let best_guess = available_constraints [INFO] [stdout] | ______________________^ [INFO] [stdout] 136 | | .iter() [INFO] [stdout] 137 | | .min_by(|&&c1, &&c2| { [INFO] [stdout] 138 | | tf_difference(c1, possible_solutions).cmp(&tf_difference(c2, possible_solutions)) [INFO] [stdout] 139 | | }) [INFO] [stdout] 140 | | .map(|g| *g); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 135 ~ let best_guess = available_constraints [INFO] [stdout] 136 + .iter() [INFO] [stdout] 137 + .min_by(|&&c1, &&c2| { [INFO] [stdout] 138 + tf_difference(c1, possible_solutions).cmp(&tf_difference(c2, possible_solutions)) [INFO] [stdout] 139 ~ }).copied(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/guess_sequence/solver.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | / available_solutions [INFO] [stdout] 160 | | .iter() [INFO] [stdout] 161 | | .filter(|&&solution| { [INFO] [stdout] 162 | | guess_sequence.iter().all(|&guess| { [INFO] [stdout] ... | [INFO] [stdout] 169 | | }) [INFO] [stdout] 170 | | .map(|s| *s) [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 159 ~ available_solutions [INFO] [stdout] 160 + .iter() [INFO] [stdout] 161 + .filter(|&&solution| { [INFO] [stdout] 162 + guess_sequence.iter().all(|&guess| { [INFO] [stdout] 163 + if guess.verified { [INFO] [stdout] 164 + solution.constraints.contains(guess.constraint) [INFO] [stdout] 165 + } else { [INFO] [stdout] 166 + !solution.constraints.contains(guess.constraint) [INFO] [stdout] 167 + } [INFO] [stdout] 168 + }) [INFO] [stdout] 169 + }).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scenario/card.rs:15:50 [INFO] [stdout] | [INFO] [stdout] 15 | fn new(num: u8, constraints: [(&'static str, fn(&Code) -> bool); N]) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/scenario/card.rs:25:27 [INFO] [stdout] | [INFO] [stdout] 25 | name: *name, [INFO] [stdout] | ^^^^^ help: try: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solver.rs:58:1 [INFO] [stdout] | [INFO] [stdout] 58 | impl Into> for Card { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 58 ~ impl From for Vec { [INFO] [stdout] 59 ~ fn from(val: Card) -> Self { [INFO] [stdout] 60 ~ val.constraints [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solver.rs:63:1 [INFO] [stdout] | [INFO] [stdout] 63 | impl Into> for Constraint { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 63 ~ impl From for Vec { [INFO] [stdout] 64 ~ fn from(val: Constraint) -> Self { [INFO] [stdout] 65 ~ vec![val] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solver.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | return None; [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] 123 - return None; [INFO] [stdout] 123 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:197:53 [INFO] [stdout] | [INFO] [stdout] 197 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:200:53 [INFO] [stdout] | [INFO] [stdout] 200 | code.iter().filter(|n: &u8| *n % 2 != 0).count() == 2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `!(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:208:53 [INFO] [stdout] | [INFO] [stdout] 208 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 0 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:211:53 [INFO] [stdout] | [INFO] [stdout] 211 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 1 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:214:53 [INFO] [stdout] | [INFO] [stdout] 214 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/scenario/card.rs:217:53 [INFO] [stdout] | [INFO] [stdout] 217 | code.iter().filter(|n: &u8| *n % 2 == 0).count() == 3 [INFO] [stdout] | ^^^^^^^^^^^ help: replace with: `(*n).is_multiple_of(2)` [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] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/guess_sequence/solver.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn guess_sequence(solutions: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 12 | pub fn guess_sequence(solutions: &Vec) -> Option> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/scenario/constraint.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 9 | #[derive(Clone, Copy, PartialEq, Eq)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 13 | pub(crate) verifier: fn(code: &Code) -> bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/scenario/card.rs:308:66 [INFO] [stdout] | [INFO] [stdout] 308 | code.iter().tuple_windows().all(|(a, b)| !(a < b)) [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solver.rs:58:1 [INFO] [stdout] | [INFO] [stdout] 58 | impl Into> for Card { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 58 ~ impl From for Vec { [INFO] [stdout] 59 ~ fn from(val: Card) -> Self { [INFO] [stdout] 60 ~ val.constraints [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solver.rs:63:1 [INFO] [stdout] | [INFO] [stdout] 63 | impl Into> for Constraint { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 63 ~ impl From for Vec { [INFO] [stdout] 64 ~ fn from(val: Constraint) -> Self { [INFO] [stdout] 65 ~ vec![val] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solver.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | return None; [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] 123 - return None; [INFO] [stdout] 123 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/guess_sequence/solver.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn guess_sequence(solutions: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 12 | pub fn guess_sequence(solutions: &Vec) -> Option> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/scenario/constraint.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 9 | #[derive(Clone, Copy, PartialEq, Eq)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 13 | pub(crate) verifier: fn(code: &Code) -> bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | inverted: inverted, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `inverted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | card_num: card_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `card_num` [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/main.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | inverted: inverted, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `inverted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | card_num: card_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `card_num` [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: use of `flat_map` with an identity function [INFO] [stdout] --> src/main.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | .flat_map(|vc| vc) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_identity [INFO] [stdout] = note: `#[warn(clippy::flat_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `flat_map` with an identity function [INFO] [stdout] --> src/main.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | .flat_map(|vc| vc) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_identity [INFO] [stdout] = note: `#[warn(clippy::flat_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.87s [INFO] running `Command { std: "docker" "inspect" "3f1d0041dd79c25d782d7e23fddf102be38a4d3a7ccb52efeeba99167709622e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3f1d0041dd79c25d782d7e23fddf102be38a4d3a7ccb52efeeba99167709622e", kill_on_drop: false }` [INFO] [stdout] 3f1d0041dd79c25d782d7e23fddf102be38a4d3a7ccb52efeeba99167709622e