[INFO] cloning repository https://github.com/procedural-rust/line-algorithms [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/procedural-rust/line-algorithms" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fprocedural-rust%2Fline-algorithms", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fprocedural-rust%2Fline-algorithms'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] bf1290d244d25d0c21e33726d43f6a553cbef576 [INFO] linting procedural-rust/line-algorithms against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fprocedural-rust%2Fline-algorithms" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/procedural-rust/line-algorithms [INFO] finished tweaking git repo https://github.com/procedural-rust/line-algorithms [INFO] tweaked toml for git repo https://github.com/procedural-rust/line-algorithms written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/procedural-rust/line-algorithms 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/procedural-rust/line-algorithms 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-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] deaa7d34f04d2ee9a012eaafe791f5b35768a60f344156cfe2c552e26895e5bf [INFO] running `Command { std: "docker" "start" "-a" "deaa7d34f04d2ee9a012eaafe791f5b35768a60f344156cfe2c552e26895e5bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "deaa7d34f04d2ee9a012eaafe791f5b35768a60f344156cfe2c552e26895e5bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "deaa7d34f04d2ee9a012eaafe791f5b35768a60f344156cfe2c552e26895e5bf", kill_on_drop: false }` [INFO] [stdout] deaa7d34f04d2ee9a012eaafe791f5b35768a60f344156cfe2c552e26895e5bf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 23936e8110a298f46660b768a36b1598862cdd91e65a79e04792d6752202fa6e [INFO] running `Command { std: "docker" "start" "-a" "23936e8110a298f46660b768a36b1598862cdd91e65a79e04792d6752202fa6e", kill_on_drop: false }` [INFO] [stderr] Checking line_algorithms v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::cmp; [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: `std::cmp` [INFO] [stdout] --> src/rational.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::cmp; [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: `std::cmp` [INFO] [stdout] --> src/rational.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RationalPoint2D` is never constructed [INFO] [stdout] --> src/main.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | struct RationalPoint2D { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point3D` is never constructed [INFO] [stdout] --> src/main.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | struct Point3D { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_cells_on_line_segment_2d_rational_scale` is never used [INFO] [stdout] --> src/main.rs:121:4 [INFO] [stdout] | [INFO] [stdout] 121 | fn integer_cells_on_line_segment_2d_rational_scale(point1: Point2D, point2: Point2D, radius: Rational) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_on_line_segment_2d` is never used [INFO] [stdout] --> src/main.rs:191:4 [INFO] [stdout] | [INFO] [stdout] 191 | fn integer_points_on_line_segment_2d(point1: Point2D, point2: Point2D) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `l_infinity_line_rational_endpoints` is never used [INFO] [stdout] --> src/main.rs:240:5 [INFO] [stdout] | [INFO] [stdout] 240 | fn l_infinity_line_rational_endpoints(point1: RationalPoint2D, point2: RationalPoint2D) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_cells_on_line_segment_3d` is never used [INFO] [stdout] --> src/main.rs:346:4 [INFO] [stdout] | [INFO] [stdout] 346 | fn integer_cells_on_line_segment_3d(point1: Point3D, point2: Point3D) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_on_line_segment_3d` is never used [INFO] [stdout] --> src/main.rs:411:4 [INFO] [stdout] | [INFO] [stdout] 411 | fn integer_points_on_line_segment_3d(point1: Point3D, point2: Point3D) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_circle_slow` is never used [INFO] [stdout] --> src/main.rs:464:4 [INFO] [stdout] | [INFO] [stdout] 464 | fn integer_points_inside_circle_slow(center: Point2D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_circle` is never used [INFO] [stdout] --> src/main.rs:483:4 [INFO] [stdout] | [INFO] [stdout] 483 | fn integer_points_inside_circle(center: Point2D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_dimond_2d` is never used [INFO] [stdout] --> src/main.rs:520:4 [INFO] [stdout] | [INFO] [stdout] 520 | fn integer_points_inside_dimond_2d(center: Point2D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_square` is never used [INFO] [stdout] --> src/main.rs:538:4 [INFO] [stdout] | [INFO] [stdout] 538 | fn integer_points_inside_square(center: Point2D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_sphere_slow` is never used [INFO] [stdout] --> src/main.rs:556:4 [INFO] [stdout] | [INFO] [stdout] 556 | fn integer_points_inside_sphere_slow(center: Point3D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_sphere_helper` is never used [INFO] [stdout] --> src/main.rs:577:4 [INFO] [stdout] | [INFO] [stdout] 577 | fn integer_points_inside_sphere_helper(center: Point2D, radius_squared: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_sphere` is never used [INFO] [stdout] --> src/main.rs:612:4 [INFO] [stdout] | [INFO] [stdout] 612 | fn integer_points_inside_sphere(center: Point3D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_dimond_3d` is never used [INFO] [stdout] --> src/main.rs:637:4 [INFO] [stdout] | [INFO] [stdout] 637 | fn integer_points_inside_dimond_3d(center: Point3D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_l_infinity_sphere` is never used [INFO] [stdout] --> src/main.rs:657:4 [INFO] [stdout] | [INFO] [stdout] 657 | fn integer_points_inside_l_infinity_sphere(center: Point3D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sort` is never used [INFO] [stdout] --> src/main.rs:677:4 [INFO] [stdout] | [INFO] [stdout] 677 | fn sort(mut array: A) -> A [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new_rational_from_unsigned_integers`, `numerator`, `is_neg`, `rational_floor`, and `abs` are never used [INFO] [stdout] --> src/rational.rs:117:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl Rational { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn new_rational_from_unsigned_integers(numerator: usize, denominator: usize) -> Rational{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 170 | pub fn numerator(&self) -> usize{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 174 | pub fn is_neg(&self) -> bool{ [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 225 | pub fn rational_floor(&self,denom: usize) -> Rational{ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 245 | pub fn abs(&self) -> Rational{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | my_denominator = my_denominator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_denominator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | my_numerator = my_numerator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_numerator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | my_denominator = my_denominator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_denominator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | my_numerator = my_numerator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_numerator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/rational.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | / if (neg_numerator & !neg_denominator) | (!neg_numerator & neg_denominator) { [INFO] [stdout] 102 | | my_sign = true; [INFO] [stdout] 103 | | }else{ [INFO] [stdout] 104 | | my_sign = false; [INFO] [stdout] 105 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `my_sign = (neg_numerator & !neg_denominator) | (!neg_numerator & neg_denominator);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | my_denominator = my_denominator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_denominator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | my_numerator = my_numerator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_numerator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/rational.rs:227:43 [INFO] [stdout] | [INFO] [stdout] 227 | Rational::new_rational_from_integers((a*(*self)).floor() as isize,denom as isize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(a*(*self)).floor()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/rational.rs:237:43 [INFO] [stdout] | [INFO] [stdout] 237 | Rational::new_rational_from_integers((a*(*self)).ceil() as isize,denom as isize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(a*(*self)).ceil()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/rational.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 246 | let a = Rational::new_rational_from_unsigned_integers(self.numerator,self.denominator); [INFO] [stdout] | --------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 247 | a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 246 ~ [INFO] [stdout] 247 ~ Rational::new_rational_from_unsigned_integers(self.numerator,self.denominator) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/rational.rs:304:1 [INFO] [stdout] | [INFO] [stdout] 304 | / impl PartialOrd for Rational { [INFO] [stdout] 305 | | fn partial_cmp(&self, rhs: &Rational) -> Option { [INFO] [stdout] 306 | | if self.sign & !rhs.sign { [INFO] [stdout] 307 | | Some(Ordering::Less) [INFO] [stdout] ... | [INFO] [stdout] 320 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 305 - fn partial_cmp(&self, rhs: &Rational) -> Option { [INFO] [stdout] 306 - if self.sign & !rhs.sign { [INFO] [stdout] 307 - Some(Ordering::Less) [INFO] [stdout] 308 - }else if !self.sign & rhs.sign{ [INFO] [stdout] 309 - Some(Ordering::Greater) [INFO] [stdout] 310 - }else if self.sign & rhs.sign{ [INFO] [stdout] 311 - match (self.numerator*rhs.denominator).cmp(&(self.denominator*rhs.numerator)){ [INFO] [stdout] 312 - Ordering::Equal => Some(Ordering::Equal), [INFO] [stdout] 313 - Ordering::Less => Some(Ordering::Greater), [INFO] [stdout] 314 - Ordering::Greater => Some(Ordering::Less), [INFO] [stdout] 315 - } [INFO] [stdout] 316 - }else{ [INFO] [stdout] 317 - Some((self.numerator*rhs.denominator).cmp(&(self.denominator*rhs.numerator))) [INFO] [stdout] 318 - } [INFO] [stdout] 319 - } [INFO] [stdout] 305 + fn partial_cmp(&self, rhs: &Rational) -> Option { Some(self.cmp(rhs)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | return rhs; [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] 327 - return rhs; [INFO] [stdout] 327 + rhs [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:329:13 [INFO] [stdout] | [INFO] [stdout] 329 | return self; [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] 329 - return self; [INFO] [stdout] 329 + self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:333:21 [INFO] [stdout] | [INFO] [stdout] 333 | ... return Rational::new_signed_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator,true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 333 - return Rational::new_signed_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator,true); [INFO] [stdout] 333 + Rational::new_signed_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator,true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:336:21 [INFO] [stdout] | [INFO] [stdout] 336 | ... return Rational::new_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator); [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] 336 - return Rational::new_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator); [INFO] [stdout] 336 + Rational::new_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:339:21 [INFO] [stdout] | [INFO] [stdout] 339 | ... return Rational::new_rational_from_integers(((self.numerator*rhs.denominator) as isize) - ((self.denominator*rhs.numerator) as isize),(self.denominator*rhs.denominator) as isize); [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] 339 - return Rational::new_rational_from_integers(((self.numerator*rhs.denominator) as isize) - ((self.denominator*rhs.numerator) as isize),(self.denominator*rhs.denominator) as isize); [INFO] [stdout] 339 + Rational::new_rational_from_integers(((self.numerator*rhs.denominator) as isize) - ((self.denominator*rhs.numerator) as isize),(self.denominator*rhs.denominator) as isize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:342:21 [INFO] [stdout] | [INFO] [stdout] 342 | ... return Rational::new_rational_from_integers(((self.denominator*rhs.numerator) as isize) - ((self.numerator*rhs.denominator) as isize),(self.denominator*rhs.denominator) as isize); [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] 342 - return Rational::new_rational_from_integers(((self.denominator*rhs.numerator) as isize) - ((self.numerator*rhs.denominator) as isize),(self.denominator*rhs.denominator) as isize); [INFO] [stdout] 342 + Rational::new_rational_from_integers(((self.denominator*rhs.numerator) as isize) - ((self.numerator*rhs.denominator) as isize),(self.denominator*rhs.denominator) as isize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | / if line_intersection_between_integers.denominator() == 2 { [INFO] [stdout] 90 | | kitty_coner = true; [INFO] [stdout] 91 | | }else{ [INFO] [stdout] 92 | | kitty_coner = false; [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `kitty_coner = line_intersection_between_integers.denominator() == 2;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> src/main.rs:225:43 [INFO] [stdout] | [INFO] [stdout] 225 | let common_factor = rational::gcd(run,rise.abs() as usize); //rise might be negaitive. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `rise.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | let left_x; [INFO] [stdout] | ^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 276 | left_x = left_point.x.rational_floor(2).ceil(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `left_x` here [INFO] [stdout] | [INFO] [stdout] 243 ~ [INFO] [stdout] 244 | let right_x; [INFO] [stdout] ... [INFO] [stdout] 275 | } [INFO] [stdout] 276 ~ let left_x = left_point.x.rational_floor(2).ceil(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:244:5 [INFO] [stdout] | [INFO] [stdout] 244 | let right_x; [INFO] [stdout] | ^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 277 | right_x = right_point.x.rational_ceil(2).floor(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `right_x` here [INFO] [stdout] | [INFO] [stdout] 244 ~ [INFO] [stdout] 245 | let lower_y; [INFO] [stdout] ... [INFO] [stdout] 276 | left_x = left_point.x.rational_floor(2).ceil(); [INFO] [stdout] 277 ~ let right_x = right_point.x.rational_ceil(2).floor(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:248:5 [INFO] [stdout] | [INFO] [stdout] 248 | let base_height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 303 | base_height = lower_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `base_height` here [INFO] [stdout] | [INFO] [stdout] 248 ~ [INFO] [stdout] 249 | let mut squares: Vec = Vec::new(); [INFO] [stdout] ... [INFO] [stdout] 302 | let final_height; [INFO] [stdout] 303 ~ let base_height = lower_y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:302:5 [INFO] [stdout] | [INFO] [stdout] 302 | let final_height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 303 | base_height = lower_y; [INFO] [stdout] 304 | final_height = upper_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `final_height` here [INFO] [stdout] | [INFO] [stdout] 302 ~ [INFO] [stdout] 303 | base_height = lower_y; [INFO] [stdout] 304 ~ let final_height = upper_y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:309:9 [INFO] [stdout] | [INFO] [stdout] 309 | / if line_intersection_between_integers.denominator() == 2 { [INFO] [stdout] 310 | | kitty_coner = true; [INFO] [stdout] 311 | | }else{ [INFO] [stdout] 312 | | kitty_coner = false; [INFO] [stdout] 313 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `kitty_coner = line_intersection_between_integers.denominator() == 2;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/main.rs:451:59 [INFO] [stdout] | [INFO] [stdout] 451 | ... cubes.push(Point3D{ x: num*lcm + left_point.x, y: (dydx*num*lcm).floor() as isize + left_point.y, z: (dzdx*num*lcm).floor() a... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(dydx*num*lcm).floor()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/main.rs:451:110 [INFO] [stdout] | [INFO] [stdout] 451 | ...) as isize + left_point.y, z: (dzdx*num*lcm).floor() as isize + left_point.z}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(dzdx*num*lcm).floor()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_cells_on_line_segment_3d` is never used [INFO] [stdout] --> src/main.rs:346:4 [INFO] [stdout] | [INFO] [stdout] 346 | fn integer_cells_on_line_segment_3d(point1: Point3D, point2: Point3D) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_dimond_2d` is never used [INFO] [stdout] --> src/main.rs:520:4 [INFO] [stdout] | [INFO] [stdout] 520 | fn integer_points_inside_dimond_2d(center: Point2D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_square` is never used [INFO] [stdout] --> src/main.rs:538:4 [INFO] [stdout] | [INFO] [stdout] 538 | fn integer_points_inside_square(center: Point2D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_dimond_3d` is never used [INFO] [stdout] --> src/main.rs:637:4 [INFO] [stdout] | [INFO] [stdout] 637 | fn integer_points_inside_dimond_3d(center: Point3D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `integer_points_inside_l_infinity_sphere` is never used [INFO] [stdout] --> src/main.rs:657:4 [INFO] [stdout] | [INFO] [stdout] 657 | fn integer_points_inside_l_infinity_sphere(center: Point3D, radius: isize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `numerator`, `is_neg`, and `abs` are never used [INFO] [stdout] --> src/rational.rs:170:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl Rational { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 170 | pub fn numerator(&self) -> usize{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 174 | pub fn is_neg(&self) -> bool{ [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 245 | pub fn abs(&self) -> Rational{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | my_denominator = my_denominator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_denominator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | my_numerator = my_numerator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_numerator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | my_denominator = my_denominator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_denominator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | my_numerator = my_numerator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_numerator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/rational.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | / if (neg_numerator & !neg_denominator) | (!neg_numerator & neg_denominator) { [INFO] [stdout] 102 | | my_sign = true; [INFO] [stdout] 103 | | }else{ [INFO] [stdout] 104 | | my_sign = false; [INFO] [stdout] 105 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `my_sign = (neg_numerator & !neg_denominator) | (!neg_numerator & neg_denominator);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | my_denominator = my_denominator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_denominator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/rational.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | my_numerator = my_numerator/my_gcd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `my_numerator /= my_gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/rational.rs:227:43 [INFO] [stdout] | [INFO] [stdout] 227 | Rational::new_rational_from_integers((a*(*self)).floor() as isize,denom as isize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(a*(*self)).floor()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/rational.rs:237:43 [INFO] [stdout] | [INFO] [stdout] 237 | Rational::new_rational_from_integers((a*(*self)).ceil() as isize,denom as isize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(a*(*self)).ceil()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/rational.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 246 | let a = Rational::new_rational_from_unsigned_integers(self.numerator,self.denominator); [INFO] [stdout] | --------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 247 | a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 246 ~ [INFO] [stdout] 247 ~ Rational::new_rational_from_unsigned_integers(self.numerator,self.denominator) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/rational.rs:304:1 [INFO] [stdout] | [INFO] [stdout] 304 | / impl PartialOrd for Rational { [INFO] [stdout] 305 | | fn partial_cmp(&self, rhs: &Rational) -> Option { [INFO] [stdout] 306 | | if self.sign & !rhs.sign { [INFO] [stdout] 307 | | Some(Ordering::Less) [INFO] [stdout] ... | [INFO] [stdout] 320 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 305 - fn partial_cmp(&self, rhs: &Rational) -> Option { [INFO] [stdout] 306 - if self.sign & !rhs.sign { [INFO] [stdout] 307 - Some(Ordering::Less) [INFO] [stdout] 308 - }else if !self.sign & rhs.sign{ [INFO] [stdout] 309 - Some(Ordering::Greater) [INFO] [stdout] 310 - }else if self.sign & rhs.sign{ [INFO] [stdout] 311 - match (self.numerator*rhs.denominator).cmp(&(self.denominator*rhs.numerator)){ [INFO] [stdout] 312 - Ordering::Equal => Some(Ordering::Equal), [INFO] [stdout] 313 - Ordering::Less => Some(Ordering::Greater), [INFO] [stdout] 314 - Ordering::Greater => Some(Ordering::Less), [INFO] [stdout] 315 - } [INFO] [stdout] 316 - }else{ [INFO] [stdout] 317 - Some((self.numerator*rhs.denominator).cmp(&(self.denominator*rhs.numerator))) [INFO] [stdout] 318 - } [INFO] [stdout] 319 - } [INFO] [stdout] 305 + fn partial_cmp(&self, rhs: &Rational) -> Option { Some(self.cmp(rhs)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | return rhs; [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] 327 - return rhs; [INFO] [stdout] 327 + rhs [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:329:13 [INFO] [stdout] | [INFO] [stdout] 329 | return self; [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] 329 - return self; [INFO] [stdout] 329 + self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:333:21 [INFO] [stdout] | [INFO] [stdout] 333 | ... return Rational::new_signed_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator,true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 333 - return Rational::new_signed_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator,true); [INFO] [stdout] 333 + Rational::new_signed_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator,true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:336:21 [INFO] [stdout] | [INFO] [stdout] 336 | ... return Rational::new_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator); [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] 336 - return Rational::new_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator); [INFO] [stdout] 336 + Rational::new_rational(self.denominator*rhs.numerator + self.numerator*rhs.denominator,self.denominator*rhs.denominator) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:339:21 [INFO] [stdout] | [INFO] [stdout] 339 | ... return Rational::new_rational_from_integers(((self.numerator*rhs.denominator) as isize) - ((self.denominator*rhs.numerator) as isize),(self.denominator*rhs.denominator) as isize); [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] 339 - return Rational::new_rational_from_integers(((self.numerator*rhs.denominator) as isize) - ((self.denominator*rhs.numerator) as isize),(self.denominator*rhs.denominator) as isize); [INFO] [stdout] 339 + Rational::new_rational_from_integers(((self.numerator*rhs.denominator) as isize) - ((self.denominator*rhs.numerator) as isize),(self.denominator*rhs.denominator) as isize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rational.rs:342:21 [INFO] [stdout] | [INFO] [stdout] 342 | ... return Rational::new_rational_from_integers(((self.denominator*rhs.numerator) as isize) - ((self.numerator*rhs.denominator) as isize),(self.denominator*rhs.denominator) as isize); [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] 342 - return Rational::new_rational_from_integers(((self.denominator*rhs.numerator) as isize) - ((self.numerator*rhs.denominator) as isize),(self.denominator*rhs.denominator) as isize); [INFO] [stdout] 342 + Rational::new_rational_from_integers(((self.denominator*rhs.numerator) as isize) - ((self.numerator*rhs.denominator) as isize),(self.denominator*rhs.denominator) as isize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rational.rs:608:17 [INFO] [stdout] | [INFO] [stdout] 608 | assert!(!(Rational::new_rational(1,3) < Rational::new_rational(1,3))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(Rational::new_rational(1,3) >= Rational::new_rational(1,3))` [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: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:655:27 [INFO] [stdout] | [INFO] [stdout] 655 | assert_eq!(zero + (0 as isize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:656:27 [INFO] [stdout] | [INFO] [stdout] 656 | assert_eq!(zero + (1 as isize),one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:657:27 [INFO] [stdout] | [INFO] [stdout] 657 | assert_eq!(zero + (-1 as isize),neg_one); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:658:26 [INFO] [stdout] | [INFO] [stdout] 658 | assert_eq!(one + (0 as isize),one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:659:26 [INFO] [stdout] | [INFO] [stdout] 659 | assert_eq!(one + (1 as isize),two); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:660:26 [INFO] [stdout] | [INFO] [stdout] 660 | assert_eq!(one + (-1 as isize),zero); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:661:30 [INFO] [stdout] | [INFO] [stdout] 661 | assert_eq!(neg_one + (0 as isize),neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:662:30 [INFO] [stdout] | [INFO] [stdout] 662 | assert_eq!(neg_one + (1 as isize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:663:30 [INFO] [stdout] | [INFO] [stdout] 663 | assert_eq!(neg_one + (-1 as isize),neg_two); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:664:35 [INFO] [stdout] | [INFO] [stdout] 664 | assert_eq!(neg_one_half + (1 as isize),one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:665:35 [INFO] [stdout] | [INFO] [stdout] 665 | assert_eq!(neg_one_half + (2 as isize),three_halves); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:666:35 [INFO] [stdout] | [INFO] [stdout] 666 | assert_eq!(neg_one_half + (0 as isize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:667:31 [INFO] [stdout] | [INFO] [stdout] 667 | assert_eq!(one_half + (0 as isize),one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:668:31 [INFO] [stdout] | [INFO] [stdout] 668 | assert_eq!(one_half + (1 as isize),three_halves); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:669:31 [INFO] [stdout] | [INFO] [stdout] 669 | assert_eq!(one_half + (-1 as isize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:670:35 [INFO] [stdout] | [INFO] [stdout] 670 | assert_eq!(three_halves + (-2 as isize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:671:32 [INFO] [stdout] | [INFO] [stdout] 671 | assert_eq!(one_third + (-1 as isize),neg_two_thirds); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:672:37 [INFO] [stdout] | [INFO] [stdout] 672 | assert_eq!(neg_two_thirds + (1 as isize),one_third); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:686:27 [INFO] [stdout] | [INFO] [stdout] 686 | assert_eq!(zero + (0 as usize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:687:27 [INFO] [stdout] | [INFO] [stdout] 687 | assert_eq!(zero + (1 as usize),one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:688:26 [INFO] [stdout] | [INFO] [stdout] 688 | assert_eq!(one + (0 as usize),one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:689:26 [INFO] [stdout] | [INFO] [stdout] 689 | assert_eq!(one + (1 as usize),two); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:690:30 [INFO] [stdout] | [INFO] [stdout] 690 | assert_eq!(neg_one + (0 as usize),neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:691:30 [INFO] [stdout] | [INFO] [stdout] 691 | assert_eq!(neg_one + (1 as usize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:692:35 [INFO] [stdout] | [INFO] [stdout] 692 | assert_eq!(neg_one_half + (1 as usize),one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:693:35 [INFO] [stdout] | [INFO] [stdout] 693 | assert_eq!(neg_one_half + (2 as usize),three_halves); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `2_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:694:35 [INFO] [stdout] | [INFO] [stdout] 694 | assert_eq!(neg_one_half + (0 as usize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:695:31 [INFO] [stdout] | [INFO] [stdout] 695 | assert_eq!(one_half + (0 as usize),one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:696:31 [INFO] [stdout] | [INFO] [stdout] 696 | assert_eq!(one_half + (1 as usize),three_halves); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:697:37 [INFO] [stdout] | [INFO] [stdout] 697 | assert_eq!(neg_two_thirds + (1 as usize),one_third); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:744:27 [INFO] [stdout] | [INFO] [stdout] 744 | assert_eq!(zero - (0 as isize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:745:27 [INFO] [stdout] | [INFO] [stdout] 745 | assert_eq!(zero - (-1 as isize),one); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:746:27 [INFO] [stdout] | [INFO] [stdout] 746 | assert_eq!(zero - (1 as isize),neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:747:26 [INFO] [stdout] | [INFO] [stdout] 747 | assert_eq!(one - (0 as isize),one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:748:26 [INFO] [stdout] | [INFO] [stdout] 748 | assert_eq!(one - (-1 as isize),two); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:749:26 [INFO] [stdout] | [INFO] [stdout] 749 | assert_eq!(one - (1 as isize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:750:30 [INFO] [stdout] | [INFO] [stdout] 750 | assert_eq!(neg_one - (0 as isize),neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:751:30 [INFO] [stdout] | [INFO] [stdout] 751 | assert_eq!(neg_one - (-1 as isize),zero); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:752:30 [INFO] [stdout] | [INFO] [stdout] 752 | assert_eq!(neg_one - (1 as isize),neg_two); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:753:35 [INFO] [stdout] | [INFO] [stdout] 753 | assert_eq!(neg_one_half - (-1 as isize),one_half); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:754:35 [INFO] [stdout] | [INFO] [stdout] 754 | assert_eq!(neg_one_half - (-2 as isize),three_halves); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:755:35 [INFO] [stdout] | [INFO] [stdout] 755 | assert_eq!(neg_one_half - (0 as isize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:756:31 [INFO] [stdout] | [INFO] [stdout] 756 | assert_eq!(one_half - (0 as isize),one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:757:31 [INFO] [stdout] | [INFO] [stdout] 757 | assert_eq!(one_half - (-1 as isize),three_halves); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:758:31 [INFO] [stdout] | [INFO] [stdout] 758 | assert_eq!(one_half - (1 as isize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:759:35 [INFO] [stdout] | [INFO] [stdout] 759 | assert_eq!(three_halves - (2 as isize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:760:32 [INFO] [stdout] | [INFO] [stdout] 760 | assert_eq!(one_third - (1 as isize),neg_two_thirds); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:761:37 [INFO] [stdout] | [INFO] [stdout] 761 | assert_eq!(neg_two_thirds - (-1 as isize),one_third); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:775:27 [INFO] [stdout] | [INFO] [stdout] 775 | assert_eq!(zero - (0 as usize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:776:27 [INFO] [stdout] | [INFO] [stdout] 776 | assert_eq!(zero - (1 as usize),neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:777:26 [INFO] [stdout] | [INFO] [stdout] 777 | assert_eq!(one - (0 as usize),one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:778:26 [INFO] [stdout] | [INFO] [stdout] 778 | assert_eq!(one - (1 as usize),zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:779:30 [INFO] [stdout] | [INFO] [stdout] 779 | assert_eq!(neg_one - (0 as usize),neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:780:30 [INFO] [stdout] | [INFO] [stdout] 780 | assert_eq!(neg_one - (1 as usize),neg_two); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:781:35 [INFO] [stdout] | [INFO] [stdout] 781 | assert_eq!(neg_one_half - (1 as usize),neg_three_halves); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:782:35 [INFO] [stdout] | [INFO] [stdout] 782 | assert_eq!(neg_one_half - (0 as usize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:783:31 [INFO] [stdout] | [INFO] [stdout] 783 | assert_eq!(one_half - (0 as usize),one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:784:31 [INFO] [stdout] | [INFO] [stdout] 784 | assert_eq!(one_half - (1 as usize),neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/rational.rs:785:32 [INFO] [stdout] | [INFO] [stdout] 785 | assert_eq!(one_third - (1 as usize),neg_two_thirds); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:839:27 [INFO] [stdout] | [INFO] [stdout] 839 | assert_eq!(zero * (0 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:840:27 [INFO] [stdout] | [INFO] [stdout] 840 | assert_eq!(zero * (1 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:841:27 [INFO] [stdout] | [INFO] [stdout] 841 | assert_eq!(zero * (-1 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:842:26 [INFO] [stdout] | [INFO] [stdout] 842 | assert_eq!(one * (1 as isize) , one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:843:26 [INFO] [stdout] | [INFO] [stdout] 843 | assert_eq!(one * (0 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:844:26 [INFO] [stdout] | [INFO] [stdout] 844 | assert_eq!(one * (-1 as isize) , neg_one); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:845:30 [INFO] [stdout] | [INFO] [stdout] 845 | assert_eq!(neg_one * (1 as isize) , neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:846:30 [INFO] [stdout] | [INFO] [stdout] 846 | assert_eq!(neg_one * (0 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:847:30 [INFO] [stdout] | [INFO] [stdout] 847 | assert_eq!(neg_one * (-1 as isize) , one); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:848:31 [INFO] [stdout] | [INFO] [stdout] 848 | assert_eq!(one_half * (1 as isize) , one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:849:31 [INFO] [stdout] | [INFO] [stdout] 849 | assert_eq!(one_half * (-1 as isize) , neg_one_half); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:850:31 [INFO] [stdout] | [INFO] [stdout] 850 | assert_eq!(one_half * (2 as isize) , one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:851:31 [INFO] [stdout] | [INFO] [stdout] 851 | assert_eq!(one_half * (-2 as isize) , neg_one); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:852:31 [INFO] [stdout] | [INFO] [stdout] 852 | assert_eq!(one_half * (3 as isize) , three_halves); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `3_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:853:32 [INFO] [stdout] | [INFO] [stdout] 853 | assert_eq!(one_third * (2 as isize) , two_thirds); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:854:32 [INFO] [stdout] | [INFO] [stdout] 854 | assert_eq!(one_third * (3 as isize) , one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `3_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:855:32 [INFO] [stdout] | [INFO] [stdout] 855 | assert_eq!(one_third * (-3 as isize) , neg_one); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `-3_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:867:27 [INFO] [stdout] | [INFO] [stdout] 867 | assert_eq!(zero * (0 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:868:27 [INFO] [stdout] | [INFO] [stdout] 868 | assert_eq!(zero * (1 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:869:26 [INFO] [stdout] | [INFO] [stdout] 869 | assert_eq!(one * (1 as isize) , one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:870:26 [INFO] [stdout] | [INFO] [stdout] 870 | assert_eq!(one * (0 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:871:30 [INFO] [stdout] | [INFO] [stdout] 871 | assert_eq!(neg_one * (1 as isize) , neg_one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:872:30 [INFO] [stdout] | [INFO] [stdout] 872 | assert_eq!(neg_one * (0 as isize) , zero); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:873:31 [INFO] [stdout] | [INFO] [stdout] 873 | assert_eq!(one_half * (1 as isize) , one_half); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:874:31 [INFO] [stdout] | [INFO] [stdout] 874 | assert_eq!(one_half * (2 as isize) , one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:875:31 [INFO] [stdout] | [INFO] [stdout] 875 | assert_eq!(one_half * (3 as isize) , three_halves); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `3_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:876:32 [INFO] [stdout] | [INFO] [stdout] 876 | assert_eq!(one_third * (2 as isize) , two_thirds); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `2_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/rational.rs:877:32 [INFO] [stdout] | [INFO] [stdout] 877 | assert_eq!(one_third * (3 as isize) , one); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `3_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | / if line_intersection_between_integers.denominator() == 2 { [INFO] [stdout] 90 | | kitty_coner = true; [INFO] [stdout] 91 | | }else{ [INFO] [stdout] 92 | | kitty_coner = false; [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `kitty_coner = line_intersection_between_integers.denominator() == 2;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> src/main.rs:225:43 [INFO] [stdout] | [INFO] [stdout] 225 | let common_factor = rational::gcd(run,rise.abs() as usize); //rise might be negaitive. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `rise.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | let left_x; [INFO] [stdout] | ^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 276 | left_x = left_point.x.rational_floor(2).ceil(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `left_x` here [INFO] [stdout] | [INFO] [stdout] 243 ~ [INFO] [stdout] 244 | let right_x; [INFO] [stdout] ... [INFO] [stdout] 275 | } [INFO] [stdout] 276 ~ let left_x = left_point.x.rational_floor(2).ceil(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:244:5 [INFO] [stdout] | [INFO] [stdout] 244 | let right_x; [INFO] [stdout] | ^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 277 | right_x = right_point.x.rational_ceil(2).floor(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `right_x` here [INFO] [stdout] | [INFO] [stdout] 244 ~ [INFO] [stdout] 245 | let lower_y; [INFO] [stdout] ... [INFO] [stdout] 276 | left_x = left_point.x.rational_floor(2).ceil(); [INFO] [stdout] 277 ~ let right_x = right_point.x.rational_ceil(2).floor(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:248:5 [INFO] [stdout] | [INFO] [stdout] 248 | let base_height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 303 | base_height = lower_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `base_height` here [INFO] [stdout] | [INFO] [stdout] 248 ~ [INFO] [stdout] 249 | let mut squares: Vec = Vec::new(); [INFO] [stdout] ... [INFO] [stdout] 302 | let final_height; [INFO] [stdout] 303 ~ let base_height = lower_y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:302:5 [INFO] [stdout] | [INFO] [stdout] 302 | let final_height; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 303 | base_height = lower_y; [INFO] [stdout] 304 | final_height = upper_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `final_height` here [INFO] [stdout] | [INFO] [stdout] 302 ~ [INFO] [stdout] 303 | base_height = lower_y; [INFO] [stdout] 304 ~ let final_height = upper_y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:309:9 [INFO] [stdout] | [INFO] [stdout] 309 | / if line_intersection_between_integers.denominator() == 2 { [INFO] [stdout] 310 | | kitty_coner = true; [INFO] [stdout] 311 | | }else{ [INFO] [stdout] 312 | | kitty_coner = false; [INFO] [stdout] 313 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `kitty_coner = line_intersection_between_integers.denominator() == 2;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/main.rs:451:59 [INFO] [stdout] | [INFO] [stdout] 451 | ... cubes.push(Point3D{ x: num*lcm + left_point.x, y: (dydx*num*lcm).floor() as isize + left_point.y, z: (dzdx*num*lcm).floor() a... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(dydx*num*lcm).floor()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/main.rs:451:110 [INFO] [stdout] | [INFO] [stdout] 451 | ...) as isize + left_point.y, z: (dzdx*num*lcm).floor() as isize + left_point.z}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(dzdx*num*lcm).floor()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.67s [INFO] running `Command { std: "docker" "inspect" "23936e8110a298f46660b768a36b1598862cdd91e65a79e04792d6752202fa6e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "23936e8110a298f46660b768a36b1598862cdd91e65a79e04792d6752202fa6e", kill_on_drop: false }` [INFO] [stdout] 23936e8110a298f46660b768a36b1598862cdd91e65a79e04792d6752202fa6e