[INFO] cloning repository https://github.com/dstilesr/geom-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/dstilesr/geom-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdstilesr%2Fgeom-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdstilesr%2Fgeom-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ec8c97ee112c28974963608ed79d8537464c0451 [INFO] linting dstilesr/geom-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdstilesr%2Fgeom-rs" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/dstilesr/geom-rs [INFO] finished tweaking git repo https://github.com/dstilesr/geom-rs [INFO] tweaked toml for git repo https://github.com/dstilesr/geom-rs written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/dstilesr/geom-rs 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/dstilesr/geom-rs 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-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 717a9ae2aeabdb258e4075b07dd8c59309960533a77fbd4312679106c7a9586c [INFO] running `Command { std: "docker" "start" "-a" "717a9ae2aeabdb258e4075b07dd8c59309960533a77fbd4312679106c7a9586c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "717a9ae2aeabdb258e4075b07dd8c59309960533a77fbd4312679106c7a9586c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "717a9ae2aeabdb258e4075b07dd8c59309960533a77fbd4312679106c7a9586c", kill_on_drop: false }` [INFO] [stdout] 717a9ae2aeabdb258e4075b07dd8c59309960533a77fbd4312679106c7a9586c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 04448d51f7ba0ad7b0d865512258dd63052a612c0b16de481b4c7d6b1f673efa [INFO] running `Command { std: "docker" "start" "-a" "04448d51f7ba0ad7b0d865512258dd63052a612c0b16de481b4c7d6b1f673efa", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.103 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Checking clap_lex v0.7.6 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking clap_builder v4.5.51 [INFO] [stderr] Compiling syn v2.0.110 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking clap v4.5.51 [INFO] [stderr] Checking geom-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/ops.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use log; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/ops.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use log; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/core.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | return 0.0; [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] 12 - return 0.0; [INFO] [stdout] 12 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/linestring.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | txt.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `txt.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/linestring.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] 41 + self.points.iter().zip(&self.points[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ops.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn convex_hull(points: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 31 ~ pub fn convex_hull(points: &[Point]) -> Option { [INFO] [stdout] 32 | if points.len() < 3 { [INFO] [stdout] ... [INFO] [stdout] 35 | [INFO] [stdout] 36 ~ let mut source_points = points.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ops.rs:66:72 [INFO] [stdout] | [INFO] [stdout] 66 | && direction(&hull[hull.len() - 2], &hull[hull.len() - 1], &pt) != Turn::Right [INFO] [stdout] | ^^^ help: change this to: `pt` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | if !(0.0 <= t2 && t2 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | if (!in_bounds) || (0.0 <= t1 && t1 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ops.rs:213:5 [INFO] [stdout] | [INFO] [stdout] 213 | return Ok(Some(Polygon::new(vertices)?)); [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] 213 - return Ok(Some(Polygon::new(vertices)?)); [INFO] [stdout] 213 + Ok(Some(Polygon::new(vertices)?)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/points.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl PartialOrd for Point { [INFO] [stdout] 41 | | /// Comparison to use when sorting points lexicographically [INFO] [stdout] 42 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 | | if self.x < other.x { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 42 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 - if self.x < other.x { [INFO] [stdout] 44 - Some(std::cmp::Ordering::Less) [INFO] [stdout] 45 - } else if self.x > other.x { [INFO] [stdout] 46 - Some(std::cmp::Ordering::Greater) [INFO] [stdout] 47 - } else { [INFO] [stdout] 48 - Some(self.y.total_cmp(&other.y)) [INFO] [stdout] 49 - } [INFO] [stdout] 50 - } [INFO] [stdout] 42 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/polygons.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | total_intersects % 2 != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!total_intersects.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/polygons.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] 116 + self.outer.iter().zip(&self.outer[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/core.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | return 0.0; [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] 12 - return 0.0; [INFO] [stdout] 12 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/linestring.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | txt.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `txt.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/linestring.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] 41 + self.points.iter().zip(&self.points[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ops.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn convex_hull(points: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 31 ~ pub fn convex_hull(points: &[Point]) -> Option { [INFO] [stdout] 32 | if points.len() < 3 { [INFO] [stdout] ... [INFO] [stdout] 35 | [INFO] [stdout] 36 ~ let mut source_points = points.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ops.rs:66:72 [INFO] [stdout] | [INFO] [stdout] 66 | && direction(&hull[hull.len() - 2], &hull[hull.len() - 1], &pt) != Turn::Right [INFO] [stdout] | ^^^ help: change this to: `pt` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | if !(0.0 <= t2 && t2 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | if (!in_bounds) || (0.0 <= t1 && t1 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ops.rs:213:5 [INFO] [stdout] | [INFO] [stdout] 213 | return Ok(Some(Polygon::new(vertices)?)); [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] 213 - return Ok(Some(Polygon::new(vertices)?)); [INFO] [stdout] 213 + Ok(Some(Polygon::new(vertices)?)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ops.rs:303:16 [INFO] [stdout] | [INFO] [stdout] 303 | if let Some(_) = intersection_point(s1, s2) { [INFO] [stdout] | -------^^^^^^^----------------------------- help: try: `if intersection_point(s1, s2).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ops.rs:310:16 [INFO] [stdout] | [INFO] [stdout] 310 | if let Some(_) = intersection_point(s1, s2) { [INFO] [stdout] | -------^^^^^^^----------------------------- help: try: `if intersection_point(s1, s2).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ops.rs:324:16 [INFO] [stdout] | [INFO] [stdout] 324 | if let Some(_) = intersection_with_line(line, seg, true) { [INFO] [stdout] | -------^^^^^^^------------------------------------------ help: try: `if intersection_with_line(line, seg, true).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/points.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl PartialOrd for Point { [INFO] [stdout] 41 | | /// Comparison to use when sorting points lexicographically [INFO] [stdout] 42 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 | | if self.x < other.x { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 42 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 - if self.x < other.x { [INFO] [stdout] 44 - Some(std::cmp::Ordering::Less) [INFO] [stdout] 45 - } else if self.x > other.x { [INFO] [stdout] 46 - Some(std::cmp::Ordering::Greater) [INFO] [stdout] 47 - } else { [INFO] [stdout] 48 - Some(self.y.total_cmp(&other.y)) [INFO] [stdout] 49 - } [INFO] [stdout] 50 - } [INFO] [stdout] 42 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/points.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | assert!(!(p1 < p2)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(p1 >= p2)` [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: this boolean expression can be simplified [INFO] [stdout] --> src/points.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | assert!(!(p3 > p4)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(p3 <= p4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/points.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | assert!(!(p3 < p3)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(p3 >= p3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `pts3` [INFO] [stdout] --> src/points.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | for i in 0..16 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 222 - for i in 0..16 { [INFO] [stdout] 222 + for (i, ) in pts3.iter().enumerate().take(16) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/polygons.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | total_intersects % 2 != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!total_intersects.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/polygons.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] 116 + self.outer.iter().zip(&self.outer[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/polygons.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | if let Ok(_) = Polygon::new(v1) { [INFO] [stdout] | -------^^^^^------------------- help: try: `if Polygon::new(v1).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/polygons.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | if let Ok(_) = Polygon::new(v2) { [INFO] [stdout] | -------^^^^^------------------- help: try: `if Polygon::new(v2).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/polygons.rs:188:16 [INFO] [stdout] | [INFO] [stdout] 188 | if let Err(_) = Polygon::new(triangle) { [INFO] [stdout] | -------^^^^^^------------------------- help: try: `if Polygon::new(triangle).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/polygons.rs:199:16 [INFO] [stdout] | [INFO] [stdout] 199 | if let Err(_) = Polygon::new(square) { [INFO] [stdout] | -------^^^^^^----------------------- help: try: `if Polygon::new(square).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/serialization/wkt.rs:275:16 [INFO] [stdout] | [INFO] [stdout] 275 | if let Err(_) = identify_type("POINT (0 0)") { [INFO] [stdout] | -------^^^^^^------------------------------- help: try: `if identify_type("POINT (0 0)").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | / match res { [INFO] [stdout] 304 | | Ok(_) => panic!("Expected parse error (capitalization)"), [INFO] [stdout] 305 | | _ => (), [INFO] [stdout] 306 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res { panic!("Expected parse error (capitalization)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:309:9 [INFO] [stdout] | [INFO] [stdout] 309 | / match res2 { [INFO] [stdout] 310 | | Ok(_) => panic!("Expected parse error (spacing)"), [INFO] [stdout] 311 | | _ => (), [INFO] [stdout] 312 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res2 { panic!("Expected parse error (spacing)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:315:9 [INFO] [stdout] | [INFO] [stdout] 315 | / match res3 { [INFO] [stdout] 316 | | Ok(_) => panic!("Expected parse error (capitalization)"), [INFO] [stdout] 317 | | _ => (), [INFO] [stdout] 318 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res3 { panic!("Expected parse error (capitalization)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | / match res4 { [INFO] [stdout] 322 | | Ok(_) => panic!("Expected parse error (invalid prefix)"), [INFO] [stdout] 323 | | _ => (), [INFO] [stdout] 324 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res4 { panic!("Expected parse error (invalid prefix)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | / match res5 { [INFO] [stdout] 328 | | Ok(_) => panic!("Expected parse error (invalid type)"), [INFO] [stdout] 329 | | _ => (), [INFO] [stdout] 330 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res5 { panic!("Expected parse error (invalid type)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:424:16 [INFO] [stdout] | [INFO] [stdout] 424 | if let Ok(_) = parse_coordinate_list("(0, 0.0 1.98)") { [INFO] [stdout] | -------^^^^^----------------------------------------- help: try: `if parse_coordinate_list("(0, 0.0 1.98)").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:428:16 [INFO] [stdout] | [INFO] [stdout] 428 | if let Ok(_) = parse_coordinate_list("(0 -1.0, 0.0 1.98, Q P)") { [INFO] [stdout] | -------^^^^^--------------------------------------------------- help: try: `if parse_coordinate_list("(0 -1.0, 0.0 1.98, Q P)").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:432:16 [INFO] [stdout] | [INFO] [stdout] 432 | if let Ok(_) = parse_coordinate_list("(0 -1.0, 0.0 1.98") { [INFO] [stdout] | -------^^^^^--------------------------------------------- help: try: `if parse_coordinate_list("(0 -1.0, 0.0 1.98").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:436:16 [INFO] [stdout] | [INFO] [stdout] 436 | if let Ok(_) = parse_coordinate_list("0 -1.0, 0.0 1.98)") { [INFO] [stdout] | -------^^^^^--------------------------------------------- help: try: `if parse_coordinate_list("0 -1.0, 0.0 1.98)").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/serialization/wkt.rs:466:29 [INFO] [stdout] | [INFO] [stdout] 466 | assert!(0.0 <= x && x <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/serialization/wkt.rs:467:29 [INFO] [stdout] | [INFO] [stdout] 467 | assert!(0.0 <= y && y <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&y)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:477:16 [INFO] [stdout] | [INFO] [stdout] 477 | if let Ok(_) = parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0)")) { [INFO] [stdout] | -------^^^^^--------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:481:16 [INFO] [stdout] | [INFO] [stdout] 481 | if let Ok(_) = parse_wkt(String::from("POLYGON((0 0, 1 0, 1 1, 0 1))")) { [INFO] [stdout] | -------^^^^^----------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON((0 0, 1 0, 1 1, 0 1))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:485:16 [INFO] [stdout] | [INFO] [stdout] 485 | if let Ok(_) = parse_wkt(String::from("POLYGON(0 0, 1 0, 0 0)")) { [INFO] [stdout] | -------^^^^^---------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON(0 0, 1 0, 0 0)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:489:16 [INFO] [stdout] | [INFO] [stdout] 489 | if let Ok(_) = parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0))")) { [INFO] [stdout] | -------^^^^^---------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:493:16 [INFO] [stdout] | [INFO] [stdout] 493 | if let Ok(_) = parse_wkt(String::from("POLYGON ((0 0, 1 0, 1 1, 0 0)")) { [INFO] [stdout] | -------^^^^^----------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON ((0 0, 1 0, 1 1, 0 0)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:547:16 [INFO] [stdout] | [INFO] [stdout] 547 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT((0 0, 1 0, 0.5 0.5, 0 1))")) { [INFO] [stdout] | -------^^^^^------------------------------------------------------------------ help: try: `if parse_wkt(String::from("MULTIPOINT((0 0, 1 0, 0.5 0.5, 0 1))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:551:16 [INFO] [stdout] | [INFO] [stdout] 551 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT(0 0, 1 0, 0.5 0.5, 0 1))")) { [INFO] [stdout] | -------^^^^^----------------------------------------------------------------- help: try: `if parse_wkt(String::from("MULTIPOINT(0 0, 1 0, 0.5 0.5, 0 1))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:555:16 [INFO] [stdout] | [INFO] [stdout] 555 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT(0 0 9.0, 1 0 -1, 0.5 0.5 0.2)")) { [INFO] [stdout] | -------^^^^^---------------------------------------------------------------------- help: try: `if parse_wkt(String::from("MULTIPOINT(0 0 9.0, 1 0 -1, 0.5 0.5 0.2)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:559:16 [INFO] [stdout] | [INFO] [stdout] 559 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT((0 0 9.0), 1 -1, (0.5 0.5))")) { [INFO] [stdout] | -------^^^^^-------------------------------------------------------------------- help: try: `if parse_wkt(String::from("MULTIPOINT((0 0 9.0), 1 -1, (0.5 0.5))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/points.rs:196:24 [INFO] [stdout] | [INFO] [stdout] 196 | let mut pts1 = vec![ [INFO] [stdout] | ________________________^ [INFO] [stdout] 197 | | Point::new(0.0, 1.0), [INFO] [stdout] 198 | | Point::new(-1.0, 1.0), [INFO] [stdout] 199 | | Point::new(0.0, 0.5), [INFO] [stdout] 200 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 196 ~ let mut pts1 = [Point::new(0.0, 1.0), [INFO] [stdout] 197 + Point::new(-1.0, 1.0), [INFO] [stdout] 198 ~ Point::new(0.0, 0.5)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/points.rs:201:20 [INFO] [stdout] | [INFO] [stdout] 201 | let pts2 = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 202 | | Point::new(-1.0, 1.0), [INFO] [stdout] 203 | | Point::new(0.0, 0.5), [INFO] [stdout] 204 | | Point::new(0.0, 1.0), [INFO] [stdout] 205 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 201 ~ let pts2 = [Point::new(-1.0, 1.0), [INFO] [stdout] 202 + Point::new(0.0, 0.5), [INFO] [stdout] 203 ~ Point::new(0.0, 1.0)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/ops.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use log; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | use log; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/ops.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use log; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | use log; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/core.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | return 0.0; [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] 12 - return 0.0; [INFO] [stdout] 12 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/core.rs:66:1 [INFO] [stdout] | [INFO] [stdout] 66 | / pub enum GeometryError { [INFO] [stdout] 67 | | ParsingError(String), [INFO] [stdout] 68 | | ParameterError(String), [INFO] [stdout] 69 | | OperationError(String), [INFO] [stdout] 70 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/linestring.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | txt.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `txt.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/linestring.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] 41 + self.points.iter().zip(&self.points[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ops.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn convex_hull(points: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 31 ~ pub fn convex_hull(points: &[Point]) -> Option { [INFO] [stdout] 32 | if points.len() < 3 { [INFO] [stdout] ... [INFO] [stdout] 35 | [INFO] [stdout] 36 ~ let mut source_points = points.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ops.rs:66:72 [INFO] [stdout] | [INFO] [stdout] 66 | && direction(&hull[hull.len() - 2], &hull[hull.len() - 1], &pt) != Turn::Right [INFO] [stdout] | ^^^ help: change this to: `pt` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | if !(0.0 <= t2 && t2 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | if (!in_bounds) || (0.0 <= t1 && t1 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ops.rs:213:5 [INFO] [stdout] | [INFO] [stdout] 213 | return Ok(Some(Polygon::new(vertices)?)); [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] 213 - return Ok(Some(Polygon::new(vertices)?)); [INFO] [stdout] 213 + Ok(Some(Polygon::new(vertices)?)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/points.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl PartialOrd for Point { [INFO] [stdout] 41 | | /// Comparison to use when sorting points lexicographically [INFO] [stdout] 42 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 | | if self.x < other.x { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 42 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 - if self.x < other.x { [INFO] [stdout] 44 - Some(std::cmp::Ordering::Less) [INFO] [stdout] 45 - } else if self.x > other.x { [INFO] [stdout] 46 - Some(std::cmp::Ordering::Greater) [INFO] [stdout] 47 - } else { [INFO] [stdout] 48 - Some(self.y.total_cmp(&other.y)) [INFO] [stdout] 49 - } [INFO] [stdout] 50 - } [INFO] [stdout] 42 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/polygons.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | total_intersects % 2 != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!total_intersects.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/polygons.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] 116 + self.outer.iter().zip(&self.outer[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/core.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | return 0.0; [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] 12 - return 0.0; [INFO] [stdout] 12 + 0.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/core.rs:66:1 [INFO] [stdout] | [INFO] [stdout] 66 | / pub enum GeometryError { [INFO] [stdout] 67 | | ParsingError(String), [INFO] [stdout] 68 | | ParameterError(String), [INFO] [stdout] 69 | | OperationError(String), [INFO] [stdout] 70 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/linestring.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | txt.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `txt.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/linestring.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return self.points.iter().zip(&self.points[1..]); [INFO] [stdout] 41 + self.points.iter().zip(&self.points[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ops.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn convex_hull(points: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 31 ~ pub fn convex_hull(points: &[Point]) -> Option { [INFO] [stdout] 32 | if points.len() < 3 { [INFO] [stdout] ... [INFO] [stdout] 35 | [INFO] [stdout] 36 ~ let mut source_points = points.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ops.rs:66:72 [INFO] [stdout] | [INFO] [stdout] 66 | && direction(&hull[hull.len() - 2], &hull[hull.len() - 1], &pt) != Turn::Right [INFO] [stdout] | ^^^ help: change this to: `pt` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | if !(0.0 <= t2 && t2 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ops.rs:136:24 [INFO] [stdout] | [INFO] [stdout] 136 | if (!in_bounds) || (0.0 <= t1 && t1 <= 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&t1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ops.rs:213:5 [INFO] [stdout] | [INFO] [stdout] 213 | return Ok(Some(Polygon::new(vertices)?)); [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] 213 - return Ok(Some(Polygon::new(vertices)?)); [INFO] [stdout] 213 + Ok(Some(Polygon::new(vertices)?)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ops.rs:303:16 [INFO] [stdout] | [INFO] [stdout] 303 | if let Some(_) = intersection_point(s1, s2) { [INFO] [stdout] | -------^^^^^^^----------------------------- help: try: `if intersection_point(s1, s2).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ops.rs:310:16 [INFO] [stdout] | [INFO] [stdout] 310 | if let Some(_) = intersection_point(s1, s2) { [INFO] [stdout] | -------^^^^^^^----------------------------- help: try: `if intersection_point(s1, s2).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/ops.rs:324:16 [INFO] [stdout] | [INFO] [stdout] 324 | if let Some(_) = intersection_with_line(line, seg, true) { [INFO] [stdout] | -------^^^^^^^------------------------------------------ help: try: `if intersection_with_line(line, seg, true).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/points.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl PartialOrd for Point { [INFO] [stdout] 41 | | /// Comparison to use when sorting points lexicographically [INFO] [stdout] 42 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 | | if self.x < other.x { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 42 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 43 - if self.x < other.x { [INFO] [stdout] 44 - Some(std::cmp::Ordering::Less) [INFO] [stdout] 45 - } else if self.x > other.x { [INFO] [stdout] 46 - Some(std::cmp::Ordering::Greater) [INFO] [stdout] 47 - } else { [INFO] [stdout] 48 - Some(self.y.total_cmp(&other.y)) [INFO] [stdout] 49 - } [INFO] [stdout] 50 - } [INFO] [stdout] 42 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | return cli_commands::parse_show_detail(source); [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] 106 - return cli_commands::parse_show_detail(source); [INFO] [stdout] 106 + cli_commands::parse_show_detail(source) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | if input.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/points.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | assert!(!(p1 < p2)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(p1 >= p2)` [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: this boolean expression can be simplified [INFO] [stdout] --> src/points.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | assert!(!(p3 > p4)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(p3 <= p4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/points.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | assert!(!(p3 < p3)); [INFO] [stdout] | ^^^^^^^^^^ help: try: `(p3 >= p3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `pts3` [INFO] [stdout] --> src/points.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | for i in 0..16 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 222 - for i in 0..16 { [INFO] [stdout] 222 + for (i, ) in pts3.iter().enumerate().take(16) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/polygons.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | total_intersects % 2 != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!total_intersects.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/polygons.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return self.outer.iter().zip(&self.outer[1..]); [INFO] [stdout] 116 + self.outer.iter().zip(&self.outer[1..]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/polygons.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | if let Ok(_) = Polygon::new(v1) { [INFO] [stdout] | -------^^^^^------------------- help: try: `if Polygon::new(v1).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/polygons.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | if let Ok(_) = Polygon::new(v2) { [INFO] [stdout] | -------^^^^^------------------- help: try: `if Polygon::new(v2).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/polygons.rs:188:16 [INFO] [stdout] | [INFO] [stdout] 188 | if let Err(_) = Polygon::new(triangle) { [INFO] [stdout] | -------^^^^^^------------------------- help: try: `if Polygon::new(triangle).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/polygons.rs:199:16 [INFO] [stdout] | [INFO] [stdout] 199 | if let Err(_) = Polygon::new(square) { [INFO] [stdout] | -------^^^^^^----------------------- help: try: `if Polygon::new(square).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/serialization/wkt.rs:275:16 [INFO] [stdout] | [INFO] [stdout] 275 | if let Err(_) = identify_type("POINT (0 0)") { [INFO] [stdout] | -------^^^^^^------------------------------- help: try: `if identify_type("POINT (0 0)").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | / match res { [INFO] [stdout] 304 | | Ok(_) => panic!("Expected parse error (capitalization)"), [INFO] [stdout] 305 | | _ => (), [INFO] [stdout] 306 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res { panic!("Expected parse error (capitalization)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:309:9 [INFO] [stdout] | [INFO] [stdout] 309 | / match res2 { [INFO] [stdout] 310 | | Ok(_) => panic!("Expected parse error (spacing)"), [INFO] [stdout] 311 | | _ => (), [INFO] [stdout] 312 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res2 { panic!("Expected parse error (spacing)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:315:9 [INFO] [stdout] | [INFO] [stdout] 315 | / match res3 { [INFO] [stdout] 316 | | Ok(_) => panic!("Expected parse error (capitalization)"), [INFO] [stdout] 317 | | _ => (), [INFO] [stdout] 318 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res3 { panic!("Expected parse error (capitalization)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | / match res4 { [INFO] [stdout] 322 | | Ok(_) => panic!("Expected parse error (invalid prefix)"), [INFO] [stdout] 323 | | _ => (), [INFO] [stdout] 324 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res4 { panic!("Expected parse error (invalid prefix)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/serialization/wkt.rs:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | / match res5 { [INFO] [stdout] 328 | | Ok(_) => panic!("Expected parse error (invalid type)"), [INFO] [stdout] 329 | | _ => (), [INFO] [stdout] 330 | | } [INFO] [stdout] | |_________^ help: try: `if let Ok(_) = res5 { panic!("Expected parse error (invalid type)") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:424:16 [INFO] [stdout] | [INFO] [stdout] 424 | if let Ok(_) = parse_coordinate_list("(0, 0.0 1.98)") { [INFO] [stdout] | -------^^^^^----------------------------------------- help: try: `if parse_coordinate_list("(0, 0.0 1.98)").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:428:16 [INFO] [stdout] | [INFO] [stdout] 428 | if let Ok(_) = parse_coordinate_list("(0 -1.0, 0.0 1.98, Q P)") { [INFO] [stdout] | -------^^^^^--------------------------------------------------- help: try: `if parse_coordinate_list("(0 -1.0, 0.0 1.98, Q P)").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:432:16 [INFO] [stdout] | [INFO] [stdout] 432 | if let Ok(_) = parse_coordinate_list("(0 -1.0, 0.0 1.98") { [INFO] [stdout] | -------^^^^^--------------------------------------------- help: try: `if parse_coordinate_list("(0 -1.0, 0.0 1.98").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:436:16 [INFO] [stdout] | [INFO] [stdout] 436 | if let Ok(_) = parse_coordinate_list("0 -1.0, 0.0 1.98)") { [INFO] [stdout] | -------^^^^^--------------------------------------------- help: try: `if parse_coordinate_list("0 -1.0, 0.0 1.98)").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/serialization/wkt.rs:466:29 [INFO] [stdout] | [INFO] [stdout] 466 | assert!(0.0 <= x && x <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/serialization/wkt.rs:467:29 [INFO] [stdout] | [INFO] [stdout] 467 | assert!(0.0 <= y && y <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&y)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:477:16 [INFO] [stdout] | [INFO] [stdout] 477 | if let Ok(_) = parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0)")) { [INFO] [stdout] | -------^^^^^--------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:481:16 [INFO] [stdout] | [INFO] [stdout] 481 | if let Ok(_) = parse_wkt(String::from("POLYGON((0 0, 1 0, 1 1, 0 1))")) { [INFO] [stdout] | -------^^^^^----------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON((0 0, 1 0, 1 1, 0 1))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:485:16 [INFO] [stdout] | [INFO] [stdout] 485 | if let Ok(_) = parse_wkt(String::from("POLYGON(0 0, 1 0, 0 0)")) { [INFO] [stdout] | -------^^^^^---------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON(0 0, 1 0, 0 0)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:489:16 [INFO] [stdout] | [INFO] [stdout] 489 | if let Ok(_) = parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0))")) { [INFO] [stdout] | -------^^^^^---------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON(0 0, 1 0, 1 1, 0 0))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:493:16 [INFO] [stdout] | [INFO] [stdout] 493 | if let Ok(_) = parse_wkt(String::from("POLYGON ((0 0, 1 0, 1 1, 0 0)")) { [INFO] [stdout] | -------^^^^^----------------------------------------------------------- help: try: `if parse_wkt(String::from("POLYGON ((0 0, 1 0, 1 1, 0 0)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:547:16 [INFO] [stdout] | [INFO] [stdout] 547 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT((0 0, 1 0, 0.5 0.5, 0 1))")) { [INFO] [stdout] | -------^^^^^------------------------------------------------------------------ help: try: `if parse_wkt(String::from("MULTIPOINT((0 0, 1 0, 0.5 0.5, 0 1))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:551:16 [INFO] [stdout] | [INFO] [stdout] 551 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT(0 0, 1 0, 0.5 0.5, 0 1))")) { [INFO] [stdout] | -------^^^^^----------------------------------------------------------------- help: try: `if parse_wkt(String::from("MULTIPOINT(0 0, 1 0, 0.5 0.5, 0 1))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:555:16 [INFO] [stdout] | [INFO] [stdout] 555 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT(0 0 9.0, 1 0 -1, 0.5 0.5 0.2)")) { [INFO] [stdout] | -------^^^^^---------------------------------------------------------------------- help: try: `if parse_wkt(String::from("MULTIPOINT(0 0 9.0, 1 0 -1, 0.5 0.5 0.2)")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/serialization/wkt.rs:559:16 [INFO] [stdout] | [INFO] [stdout] 559 | if let Ok(_) = parse_wkt(String::from("MULTIPOINT((0 0 9.0), 1 -1, (0.5 0.5))")) { [INFO] [stdout] | -------^^^^^-------------------------------------------------------------------- help: try: `if parse_wkt(String::from("MULTIPOINT((0 0 9.0), 1 -1, (0.5 0.5))")).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | return cli_commands::parse_show_detail(source); [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] 106 - return cli_commands::parse_show_detail(source); [INFO] [stdout] 106 + cli_commands::parse_show_detail(source) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | if input.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/points.rs:196:24 [INFO] [stdout] | [INFO] [stdout] 196 | let mut pts1 = vec![ [INFO] [stdout] | ________________________^ [INFO] [stdout] 197 | | Point::new(0.0, 1.0), [INFO] [stdout] 198 | | Point::new(-1.0, 1.0), [INFO] [stdout] 199 | | Point::new(0.0, 0.5), [INFO] [stdout] 200 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 196 ~ let mut pts1 = [Point::new(0.0, 1.0), [INFO] [stdout] 197 + Point::new(-1.0, 1.0), [INFO] [stdout] 198 ~ Point::new(0.0, 0.5)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/points.rs:201:20 [INFO] [stdout] | [INFO] [stdout] 201 | let pts2 = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 202 | | Point::new(-1.0, 1.0), [INFO] [stdout] 203 | | Point::new(0.0, 0.5), [INFO] [stdout] 204 | | Point::new(0.0, 1.0), [INFO] [stdout] 205 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 201 ~ let pts2 = [Point::new(-1.0, 1.0), [INFO] [stdout] 202 + Point::new(0.0, 0.5), [INFO] [stdout] 203 ~ Point::new(0.0, 1.0)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.20s [INFO] running `Command { std: "docker" "inspect" "04448d51f7ba0ad7b0d865512258dd63052a612c0b16de481b4c7d6b1f673efa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "04448d51f7ba0ad7b0d865512258dd63052a612c0b16de481b4c7d6b1f673efa", kill_on_drop: false }` [INFO] [stdout] 04448d51f7ba0ad7b0d865512258dd63052a612c0b16de481b4c7d6b1f673efa