[INFO] cloning repository https://github.com/russell-project-org/dr-dooal [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/russell-project-org/dr-dooal" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frussell-project-org%2Fdr-dooal", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frussell-project-org%2Fdr-dooal'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2809f571b337858d5ea212f9ec31f63da611d87f [INFO] linting russell-project-org/dr-dooal against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frussell-project-org%2Fdr-dooal" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/russell-project-org/dr-dooal [INFO] finished tweaking git repo https://github.com/russell-project-org/dr-dooal [INFO] tweaked toml for git repo https://github.com/russell-project-org/dr-dooal written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/russell-project-org/dr-dooal 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/russell-project-org/dr-dooal already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 33e73283d986660b747e0e75259037996b00c7bc019935bb314c08599605509d [INFO] running `Command { std: "docker" "start" "-a" "33e73283d986660b747e0e75259037996b00c7bc019935bb314c08599605509d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "33e73283d986660b747e0e75259037996b00c7bc019935bb314c08599605509d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "33e73283d986660b747e0e75259037996b00c7bc019935bb314c08599605509d", kill_on_drop: false }` [INFO] [stdout] 33e73283d986660b747e0e75259037996b00c7bc019935bb314c08599605509d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 84580ceefc2d4e6b28b5bdb02e8fef6fd0068141798ca53793d9910325bd04b7 [INFO] running `Command { std: "docker" "start" "-a" "84580ceefc2d4e6b28b5bdb02e8fef6fd0068141798ca53793d9910325bd04b7", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.146 [INFO] [stderr] Checking getrandom v0.2.10 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking dr-dooal v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::io` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `solver::solution::Solution` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use solver::solution::Solution; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Help` [INFO] [stdout] --> src/dooal_io/config.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use super::flags::{Flag, Help}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/numbers/rationals/rational.rs:69:27 [INFO] [stdout] | [INFO] [stdout] 69 | let actual: f32 = (self.numerator as f32/ self.denominator as f32); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 69 - let actual: f32 = (self.numerator as f32/ self.denominator as f32); [INFO] [stdout] 69 + let actual: f32 = self.numerator as f32/ self.denominator as f32 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/equations.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Formatter` [INFO] [stdout] --> src/equations.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fmt::Formatter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `solver::solution::Solution` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use solver::solution::Solution; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Help` [INFO] [stdout] --> src/dooal_io/config.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use super::flags::{Flag, Help}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/numbers/rationals/rational.rs:69:27 [INFO] [stdout] | [INFO] [stdout] 69 | let actual: f32 = (self.numerator as f32/ self.denominator as f32); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 69 - let actual: f32 = (self.numerator as f32/ self.denominator as f32); [INFO] [stdout] 69 + let actual: f32 = self.numerator as f32/ self.denominator as f32 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/equations.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Formatter` [INFO] [stdout] --> src/equations.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fmt::Formatter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solver/tableau.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | let mut integers : Vec = string.into_iter() [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/solver/tableau.rs:63:48 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|x| x.parse().unwrap_or_else(|x| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/dooal_io/parser.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn process(mut lines : Vec) { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/numbers/rationals/rational.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | let mut stuff : Vec<_>= num.split(".").collect(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/equations/constraint.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | let mut row : Vec = Vec::new(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vec_num` [INFO] [stdout] --> src/equations/constraint.rs:14:16 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn new(vec_num: Vec) -> Constraint { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_vec_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `vals` is never read [INFO] [stdout] --> src/equations/constraint.rs:20:39 [INFO] [stdout] | [INFO] [stdout] 20 | let mut vals: Vec = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/equations/constraint.rs:66:25 [INFO] [stdout] | [INFO] [stdout] 66 | let mut last_digit : Rational = Rational::from_string((*name).clone()); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let r: Rational = Rational::new(3, 2).unwrap_or_else(|_err| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Solution` is never used [INFO] [stdout] --> src/solver/solution.rs:1:10 [INFO] [stdout] | [INFO] [stdout] 1 | pub enum Solution { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `query` is never read [INFO] [stdout] --> src/dooal_io/config.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 4 | query: Flag, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `check_query` is never used [INFO] [stdout] --> src/dooal_io/config.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl Config { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | fn check_query(args: &[String]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Help` is never constructed [INFO] [stdout] --> src/dooal_io/flags.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Help { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solve` is never constructed [INFO] [stdout] --> src/dooal_io/flags.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Solve { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Convert` is never constructed [INFO] [stdout] --> src/dooal_io/flags.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct Convert { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `got_equal` is never used [INFO] [stdout] --> src/equations.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl EqualityDetector { [INFO] [stdout] | --------------------- associated function in this implementation [INFO] [stdout] 12 | pub fn got_equal(string : &String) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Normalisable` is never used [INFO] [stdout] --> src/equations.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | pub trait Normalisable { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Insertable` is never used [INFO] [stdout] --> src/equations.rs:27:11 [INFO] [stdout] | [INFO] [stdout] 27 | pub trait Insertable { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `leq`, `pos_slacks`, and `neg_slacks` are never read [INFO] [stdout] --> src/equations/constraint.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Constraint { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 7 | pub constraint : Vec, [INFO] [stdout] 8 | pub leq : bool, [INFO] [stdout] | ^^^ [INFO] [stdout] 9 | pub pos_slacks : i32, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 10 | pub neg_slacks : i32 [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Constraint` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/equations/constraint.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Constraint { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 14 | pub fn new(vec_num: Vec) -> Constraint { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `is_y_slack`, `is_s_slack`, `id`, `is_basic`, `is_positive_slack`, and `var_value` are never read [INFO] [stdout] --> src/equations/variable.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Variable { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 4 | pub is_y_slack : bool, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 5 | pub is_s_slack : bool, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 6 | pub id : i32, [INFO] [stdout] | ^^ [INFO] [stdout] 7 | pub is_basic : bool, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 8 | pub is_positive_slack : bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 9 | pub var_value: Option [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `identify_s_slack`, `identify_y_slack`, and `assign_value` are never used [INFO] [stdout] --> src/equations/variable.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Variable { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn identify_s_slack(&mut self, is_s_slack: bool, is_positive: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn identify_y_slack(&mut self, is_y_slack: bool, is_positive: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub fn assign_value(&mut self, value: Rational) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/solver/solution.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | UniqueSolution, [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: variant name ends with the enum's name [INFO] [stdout] --> src/solver/solution.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | UnboundedSolution [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver/tableau.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn map_replace(vector : &Vec, old_val: String, new_val : String) -> 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] 32 - pub fn map_replace(vector : &Vec, old_val: String, new_val : String) -> Vec { [INFO] [stdout] 32 + pub fn map_replace(vector : &[String], old_val: String, new_val : String) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/solver/tableau.rs:47:34 [INFO] [stdout] | [INFO] [stdout] 47 | Tableau::map_replace(&vector, String::from("eq"), [INFO] [stdout] | ^^^^^^^ help: change this to: `vector` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/solver/tableau.rs:50:34 [INFO] [stdout] | [INFO] [stdout] 50 | Tableau::map_replace(&vector, String::from("eq"), [INFO] [stdout] | ^^^^^^^ help: change this to: `vector` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `integers` [INFO] [stdout] --> src/solver/tableau.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for i in 0..=num_integers - 1 { [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] 68 - for i in 0..=num_integers - 1 { [INFO] [stdout] 68 + for in integers.iter().take((num_integers - 1) + 1) { [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/dooal_io/reader.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | / for line in lines { [INFO] [stdout] 11 | | if let Ok(ip) = line { [INFO] [stdout] 12 | | lines_in_file.push(ip); [INFO] [stdout] 13 | | } [INFO] [stdout] 14 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/dooal_io/reader.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | / if let Ok(ip) = line { [INFO] [stdout] 12 | | lines_in_file.push(ip); [INFO] [stdout] 13 | | } [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] 10 ~ for ip in lines.flatten() { [INFO] [stdout] 11 + lines_in_file.push(ip); [INFO] [stdout] 12 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solver/tableau.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | let mut integers : Vec = string.into_iter() [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/solver/tableau.rs:63:48 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|x| x.parse().unwrap_or_else(|x| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/dooal_io/config.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 31 - return true; [INFO] [stdout] 31 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/dooal_io/parser.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn process(mut lines : Vec) { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/numbers/rationals/rational.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | if (x > 0 && y < 0) || (x < 0 && y < 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 43 - if (x > 0 && y < 0) || (x < 0 && y < 0) { [INFO] [stdout] 43 + if !(y >= 0 || x <= 0 && x >= 0) { [INFO] [stdout] | [INFO] [stdout] 43 - if (x > 0 && y < 0) || (x < 0 && y < 0) { [INFO] [stdout] 43 + if (x < 0 || x > 0) && y < 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/numbers/rationals/rational.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | let mut stuff : Vec<_>= num.split(".").collect(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/numbers/rationals/rational.rs:44:46 [INFO] [stdout] | [INFO] [stdout] 44 | Ok(Rational { numerator: -1 * x, denominator: -1 * y }) [INFO] [stdout] | ^^^^^^ help: consider using: `-x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/numbers/rationals/rational.rs:44:67 [INFO] [stdout] | [INFO] [stdout] 44 | Ok(Rational { numerator: -1 * x, denominator: -1 * y }) [INFO] [stdout] | ^^^^^^ help: consider using: `-y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/numbers/rationals/rational.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | let tup: (i32, i32) = (self.numerator.clone(), self.denominator.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/numbers/rationals/rational.rs:58:56 [INFO] [stdout] | [INFO] [stdout] 58 | let tup: (i32, i32) = (self.numerator.clone(), self.denominator.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/equations/constraint.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | let mut row : Vec = Vec::new(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vec_num` [INFO] [stdout] --> src/equations/constraint.rs:14:16 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn new(vec_num: Vec) -> Constraint { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_vec_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `vals` is never read [INFO] [stdout] --> src/equations/constraint.rs:20:39 [INFO] [stdout] | [INFO] [stdout] 20 | let mut vals: Vec = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/equations/constraint.rs:66:25 [INFO] [stdout] | [INFO] [stdout] 66 | let mut last_digit : Rational = Rational::from_string((*name).clone()); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/equations/constraint.rs:41:32 [INFO] [stdout] | [INFO] [stdout] 41 | self.constraint.iter().fold(Ok(()), |result, rat| { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 42 | | result.and_then(|_| write!(f, "| {} |", rat)) [INFO] [stdout] 43 | | }) [INFO] [stdout] | |__________^ help: use `try_fold` instead: `try_fold((), |result, rat| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/equations/objective.rs:33:40 [INFO] [stdout] | [INFO] [stdout] 33 | self.objective_function.iter().fold(Ok(()), |result, rat| { [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 34 | | result.and_then(|_| write!(f, "| {} |", rat)) [INFO] [stdout] 35 | | }) [INFO] [stdout] | |__________^ help: use `try_fold` instead: `try_fold((), |result, rat| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/equations.rs:12:31 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn got_equal(string : &String) -> bool { [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] 12 - pub fn got_equal(string : &String) -> bool { [INFO] [stdout] 12 + pub fn got_equal(string : &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let r: Rational = Rational::new(3, 2).unwrap_or_else(|_err| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/equations.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | strings.into_iter().filter(|x| *x == &keyword).count() > 0 [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Solution` is never used [INFO] [stdout] --> src/solver/solution.rs:1:10 [INFO] [stdout] | [INFO] [stdout] 1 | pub enum Solution { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `query` is never read [INFO] [stdout] --> src/dooal_io/config.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Config { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 4 | query: Flag, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `check_query` is never used [INFO] [stdout] --> src/dooal_io/config.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl Config { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | fn check_query(args: &[String]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Help` is never constructed [INFO] [stdout] --> src/dooal_io/flags.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Help { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solve` is never constructed [INFO] [stdout] --> src/dooal_io/flags.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Solve { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Convert` is never constructed [INFO] [stdout] --> src/dooal_io/flags.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct Convert { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `got_equal` is never used [INFO] [stdout] --> src/equations.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl EqualityDetector { [INFO] [stdout] | --------------------- associated function in this implementation [INFO] [stdout] 12 | pub fn got_equal(string : &String) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Normalisable` is never used [INFO] [stdout] --> src/equations.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | pub trait Normalisable { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Insertable` is never used [INFO] [stdout] --> src/equations.rs:27:11 [INFO] [stdout] | [INFO] [stdout] 27 | pub trait Insertable { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `leq`, `pos_slacks`, and `neg_slacks` are never read [INFO] [stdout] --> src/equations/constraint.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Constraint { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 7 | pub constraint : Vec, [INFO] [stdout] 8 | pub leq : bool, [INFO] [stdout] | ^^^ [INFO] [stdout] 9 | pub pos_slacks : i32, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 10 | pub neg_slacks : i32 [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Constraint` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/equations/constraint.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Constraint { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 14 | pub fn new(vec_num: Vec) -> Constraint { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `is_y_slack`, `is_s_slack`, `id`, `is_basic`, `is_positive_slack`, and `var_value` are never read [INFO] [stdout] --> src/equations/variable.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Variable { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 4 | pub is_y_slack : bool, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 5 | pub is_s_slack : bool, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 6 | pub id : i32, [INFO] [stdout] | ^^ [INFO] [stdout] 7 | pub is_basic : bool, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 8 | pub is_positive_slack : bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 9 | pub var_value: Option [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `identify_s_slack`, `identify_y_slack`, and `assign_value` are never used [INFO] [stdout] --> src/equations/variable.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Variable { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn identify_s_slack(&mut self, is_s_slack: bool, is_positive: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn identify_y_slack(&mut self, is_y_slack: bool, is_positive: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub fn assign_value(&mut self, value: Rational) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/solver/solution.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | UniqueSolution, [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: variant name ends with the enum's name [INFO] [stdout] --> src/solver/solution.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | UnboundedSolution [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver/tableau.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn map_replace(vector : &Vec, old_val: String, new_val : String) -> 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] 32 - pub fn map_replace(vector : &Vec, old_val: String, new_val : String) -> Vec { [INFO] [stdout] 32 + pub fn map_replace(vector : &[String], old_val: String, new_val : String) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/solver/tableau.rs:47:34 [INFO] [stdout] | [INFO] [stdout] 47 | Tableau::map_replace(&vector, String::from("eq"), [INFO] [stdout] | ^^^^^^^ help: change this to: `vector` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/solver/tableau.rs:50:34 [INFO] [stdout] | [INFO] [stdout] 50 | Tableau::map_replace(&vector, String::from("eq"), [INFO] [stdout] | ^^^^^^^ help: change this to: `vector` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `integers` [INFO] [stdout] --> src/solver/tableau.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for i in 0..=num_integers - 1 { [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] 68 - for i in 0..=num_integers - 1 { [INFO] [stdout] 68 + for in integers.iter().take((num_integers - 1) + 1) { [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/dooal_io/reader.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | / for line in lines { [INFO] [stdout] 11 | | if let Ok(ip) = line { [INFO] [stdout] 12 | | lines_in_file.push(ip); [INFO] [stdout] 13 | | } [INFO] [stdout] 14 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/dooal_io/reader.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | / if let Ok(ip) = line { [INFO] [stdout] 12 | | lines_in_file.push(ip); [INFO] [stdout] 13 | | } [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] 10 ~ for ip in lines.flatten() { [INFO] [stdout] 11 + lines_in_file.push(ip); [INFO] [stdout] 12 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/dooal_io/config.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 31 - return true; [INFO] [stdout] 31 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/numbers/rationals/rational.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | if (x > 0 && y < 0) || (x < 0 && y < 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 43 - if (x > 0 && y < 0) || (x < 0 && y < 0) { [INFO] [stdout] 43 + if !(y >= 0 || x <= 0 && x >= 0) { [INFO] [stdout] | [INFO] [stdout] 43 - if (x > 0 && y < 0) || (x < 0 && y < 0) { [INFO] [stdout] 43 + if (x < 0 || x > 0) && y < 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/numbers/rationals/rational.rs:44:46 [INFO] [stdout] | [INFO] [stdout] 44 | Ok(Rational { numerator: -1 * x, denominator: -1 * y }) [INFO] [stdout] | ^^^^^^ help: consider using: `-x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/numbers/rationals/rational.rs:44:67 [INFO] [stdout] | [INFO] [stdout] 44 | Ok(Rational { numerator: -1 * x, denominator: -1 * y }) [INFO] [stdout] | ^^^^^^ help: consider using: `-y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/numbers/rationals/rational.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | let tup: (i32, i32) = (self.numerator.clone(), self.denominator.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.numerator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/numbers/rationals/rational.rs:58:56 [INFO] [stdout] | [INFO] [stdout] 58 | let tup: (i32, i32) = (self.numerator.clone(), self.denominator.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.denominator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/equations/constraint.rs:41:32 [INFO] [stdout] | [INFO] [stdout] 41 | self.constraint.iter().fold(Ok(()), |result, rat| { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 42 | | result.and_then(|_| write!(f, "| {} |", rat)) [INFO] [stdout] 43 | | }) [INFO] [stdout] | |__________^ help: use `try_fold` instead: `try_fold((), |result, rat| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/equations/objective.rs:33:40 [INFO] [stdout] | [INFO] [stdout] 33 | self.objective_function.iter().fold(Ok(()), |result, rat| { [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 34 | | result.and_then(|_| write!(f, "| {} |", rat)) [INFO] [stdout] 35 | | }) [INFO] [stdout] | |__________^ help: use `try_fold` instead: `try_fold((), |result, rat| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/equations.rs:12:31 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn got_equal(string : &String) -> bool { [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] 12 - pub fn got_equal(string : &String) -> bool { [INFO] [stdout] 12 + pub fn got_equal(string : &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/equations.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | strings.into_iter().filter(|x| *x == &keyword).count() > 0 [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.15s [INFO] running `Command { std: "docker" "inspect" "84580ceefc2d4e6b28b5bdb02e8fef6fd0068141798ca53793d9910325bd04b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "84580ceefc2d4e6b28b5bdb02e8fef6fd0068141798ca53793d9910325bd04b7", kill_on_drop: false }` [INFO] [stdout] 84580ceefc2d4e6b28b5bdb02e8fef6fd0068141798ca53793d9910325bd04b7