[INFO] fetching crate babushka 0.1.10... [INFO] linting babushka-0.1.10 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate babushka 0.1.10 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate babushka 0.1.10 [INFO] finished tweaking crates.io crate babushka 0.1.10 [INFO] tweaked toml for crates.io crate babushka 0.1.10 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate babushka 0.1.10 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 crates.io crate babushka 0.1.10 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded font8x8 v0.3.1 [INFO] [stderr] Downloaded xml-rs v0.8.21 [INFO] [stderr] Downloaded minifb v0.27.0 [INFO] [stderr] Downloaded cc v1.1.15 [INFO] [stderr] Downloaded rustix v0.38.35 [INFO] [stderr] Downloaded syn v2.0.76 [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] cd0153102eb3f35075e03e12a0fd48c7f804d5e901e01a329f10dccdfa274fad [INFO] running `Command { std: "docker" "start" "-a" "cd0153102eb3f35075e03e12a0fd48c7f804d5e901e01a329f10dccdfa274fad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "cd0153102eb3f35075e03e12a0fd48c7f804d5e901e01a329f10dccdfa274fad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cd0153102eb3f35075e03e12a0fd48c7f804d5e901e01a329f10dccdfa274fad", kill_on_drop: false }` [INFO] [stdout] cd0153102eb3f35075e03e12a0fd48c7f804d5e901e01a329f10dccdfa274fad [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] 0a394bacff02452162bdcdfbf7329197887ca8c6eb8f2d1a556130e1d9a3671b [INFO] running `Command { std: "docker" "start" "-a" "0a394bacff02452162bdcdfbf7329197887ca8c6eb8f2d1a556130e1d9a3671b", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.3.0 [INFO] [stderr] Compiling libc v0.2.158 [INFO] [stderr] Compiling pkg-config v0.3.30 [INFO] [stderr] Compiling xml-rs v0.8.21 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Compiling rustix v0.38.35 [INFO] [stderr] Compiling prettyplease v0.2.22 [INFO] [stderr] Compiling cc v1.1.15 [INFO] [stderr] Checking libloading v0.8.5 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling bitflags v2.6.0 [INFO] [stderr] Compiling regex-syntax v0.8.4 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling linux-raw-sys v0.4.14 [INFO] [stderr] Compiling memchr v2.7.4 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling syn v2.0.76 [INFO] [stderr] Compiling either v1.13.0 [INFO] [stderr] Compiling bindgen v0.65.1 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Checking downcast-rs v1.2.1 [INFO] [stderr] Compiling home v0.5.9 [INFO] [stderr] Checking scoped-tls v1.0.1 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling wayland-scanner v0.29.5 [INFO] [stderr] Checking gimli v0.29.0 [INFO] [stderr] Checking object v0.36.3 [INFO] [stderr] Checking miniz_oxide v0.7.4 [INFO] [stderr] Checking fastrand v2.1.1 [INFO] [stderr] Compiling anyhow v1.0.87 [INFO] [stderr] Compiling wayland-sys v0.29.5 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Checking rustc-demangle v0.1.24 [INFO] [stderr] Checking xcursor v0.3.8 [INFO] [stderr] Checking indexmap v2.5.0 [INFO] [stderr] Checking fixedbitset v0.4.2 [INFO] [stderr] Checking weezl v0.1.8 [INFO] [stderr] Checking raw-window-handle v0.6.2 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Checking petgraph v0.6.5 [INFO] [stderr] Checking gif v0.13.1 [INFO] [stderr] Compiling backtrace v0.3.73 [INFO] [stderr] Compiling minifb v0.27.0 [INFO] [stderr] Checking tempfile v3.12.0 [INFO] [stderr] Checking font8x8 v0.3.1 [INFO] [stderr] Compiling regex-automata v0.4.7 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Compiling wayland-client v0.29.5 [INFO] [stderr] Compiling wayland-protocols v0.29.5 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Checking addr2line v0.22.0 [INFO] [stderr] Checking wayland-commons v0.29.5 [INFO] [stderr] Compiling which v4.4.2 [INFO] [stderr] Compiling regex v1.10.6 [INFO] [stderr] Checking wayland-cursor v0.29.5 [INFO] [stderr] Compiling babushka v0.1.10 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `ToPrimitive` [INFO] [stdout] --> src/no_fit_polygon.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | use num_traits::{Float, ToPrimitive, Zero}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/parsers/terashima.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn parse_terashima(reader: R) -> Result> [INFO] [stdout] | ^ [INFO] [stdout] 34 | where [INFO] [stdout] 35 | P: From>, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ToPrimitive` [INFO] [stdout] --> src/polygon.rs:6:30 [INFO] [stdout] | [INFO] [stdout] 6 | use num_traits::{Float, One, ToPrimitive, Zero}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AbsDiffEq` [INFO] [stdout] --> src/raster.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use approx::{abs_diff_eq, AbsDiffEq}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ChunkBy` [INFO] [stdout] --> src/raster.rs:12:17 [INFO] [stdout] | [INFO] [stdout] 12 | use itertools::{ChunkBy, Itertools}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Num` [INFO] [stdout] --> src/raster.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | use num_traits::{Float, Num, NumCast, One, ToPrimitive}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ToPrimitive` [INFO] [stdout] --> src/no_fit_polygon.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | use num_traits::{Float, ToPrimitive, Zero}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/parsers/terashima.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn parse_terashima(reader: R) -> Result> [INFO] [stdout] | ^ [INFO] [stdout] 34 | where [INFO] [stdout] 35 | P: From>, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ToPrimitive` [INFO] [stdout] --> src/polygon.rs:6:30 [INFO] [stdout] | [INFO] [stdout] 6 | use num_traits::{Float, One, ToPrimitive, Zero}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AbsDiffEq` [INFO] [stdout] --> src/raster.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use approx::{abs_diff_eq, AbsDiffEq}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ChunkBy` [INFO] [stdout] --> src/raster.rs:12:17 [INFO] [stdout] | [INFO] [stdout] 12 | use itertools::{ChunkBy, Itertools}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Num` [INFO] [stdout] --> src/raster.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | use num_traits::{Float, Num, NumCast, One, ToPrimitive}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scale` [INFO] [stdout] --> src/raster.rs:416:5 [INFO] [stdout] | [INFO] [stdout] 416 | scale: f64, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scale` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/no_fit_polygon.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | let min_self_by_y = self_c [INFO] [stdout] | _____________________________^ [INFO] [stdout] 58 | | .iter_vertices() [INFO] [stdout] 59 | | .min_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 60 | | .unwrap() [INFO] [stdout] 61 | | .clone(); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 57 ~ let min_self_by_y = self_c [INFO] [stdout] 58 + .iter_vertices() [INFO] [stdout] 59 + .min_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 60 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/no_fit_polygon.rs:63:30 [INFO] [stdout] | [INFO] [stdout] 63 | let max_other_by_y = other [INFO] [stdout] | ______________________________^ [INFO] [stdout] 64 | | .iter_vertices() [INFO] [stdout] 65 | | .max_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 66 | | .unwrap() [INFO] [stdout] 67 | | .clone(); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 63 ~ let max_other_by_y = other [INFO] [stdout] 64 + .iter_vertices() [INFO] [stdout] 65 + .max_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 66 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nfp` [INFO] [stdout] --> src/no_fit_polygon.rs:391:34 [INFO] [stdout] | [INFO] [stdout] 391 | for i in 0..nfp.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 391 - for i in 0..nfp.len() - 1 { [INFO] [stdout] 391 + for in nfp.iter().take(nfp.len() - 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/no_fit_polygon.rs:551:24 [INFO] [stdout] | [INFO] [stdout] 551 | if !(!abs_diff_eq!(d, Zero::zero(), epsilon = Self::value_epsilon()) [INFO] [stdout] | ________________________^ [INFO] [stdout] 552 | | && d > Zero::zero()) [INFO] [stdout] | |____________________________________________^ help: try: `abs_diff_eq!(d, Zero::zero(), epsilon = Self::value_epsilon()) || d <= Zero::zero()` [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: called `unwrap` on `d2` after checking its variant with `is_none` [INFO] [stdout] --> src/no_fit_polygon.rs:518:46 [INFO] [stdout] | [INFO] [stdout] 515 | } else if d2.is_none() { [INFO] [stdout] | --------------- help: try: `if let Some() = d2` [INFO] [stdout] ... [INFO] [stdout] 518 | Some(d1.unwrap().min(d2.unwrap())) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/no_fit_polygon.rs:434:22 [INFO] [stdout] | [INFO] [stdout] 434 | self_marked: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 434 ~ self_marked: &[bool], [INFO] [stdout] 435 | inside: bool, [INFO] [stdout] ... [INFO] [stdout] 439 | let mut other = other.clone(); [INFO] [stdout] 440 ~ let mut self_marked = self_marked.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/no_fit_polygon.rs:484:21 [INFO] [stdout] | [INFO] [stdout] 484 | / let Some(mut other_inside) = other_inside else { [INFO] [stdout] 485 | | return None; [INFO] [stdout] 486 | | }; [INFO] [stdout] | |______________________^ help: replace it with: `let mut other_inside = other_inside?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/parsers/terashima.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/parsers/terashima.rs:80:14 [INFO] [stdout] | [INFO] [stdout] 80 | .trim() [INFO] [stdout] | ______________^ [INFO] [stdout] 81 | | .split_whitespace() [INFO] [stdout] | |_____________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Self` which implements the `Copy` trait [INFO] [stdout] --> src/point.rs:68:25 [INFO] [stdout] | [INFO] [stdout] 68 | return Some(self.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Self` which implements the `Copy` trait [INFO] [stdout] --> src/point.rs:75:23 [INFO] [stdout] | [INFO] [stdout] 75 | let mut out = self.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/point.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | / if !abs_diff_eq!(self.y(), b.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 91 | | && !abs_diff_eq!(self.y(), a.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 92 | | && self.y() < b.y().max(a.y()) [INFO] [stdout] 93 | | && self.y() > b.y().min(a.y()) [INFO] [stdout] ... | [INFO] [stdout] 97 | | return false; [INFO] [stdout] 98 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 90 ~ return !abs_diff_eq!(self.y(), b.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 91 + && !abs_diff_eq!(self.y(), a.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 92 + && self.y() < b.y().max(a.y()) && self.y() > b.y().min(a.y()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/point.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | / if !abs_diff_eq!(self.x(), b.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 106 | | && !abs_diff_eq!(self.x(), a.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 107 | | && self.x() < b.x().max(a.x()) [INFO] [stdout] 108 | | && self.x() > b.x().min(a.x()) [INFO] [stdout] ... | [INFO] [stdout] 112 | | return false; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 105 ~ return !abs_diff_eq!(self.x(), b.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 106 + && !abs_diff_eq!(self.x(), a.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 107 + && self.x() < b.x().max(a.x()) && self.x() > b.x().min(a.x()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/point.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let Some(normal) = normal else { return None }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let normal = normal?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/polygon.rs:106:26 [INFO] [stdout] | [INFO] [stdout] 106 | let mut offset = self.offset().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.offset()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/polygon.rs:114:22 [INFO] [stdout] | [INFO] [stdout] 114 | let offset = self.offset().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.offset()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/polygon.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | / let Some(dir) = direction.normalized() else { [INFO] [stdout] 214 | | return None; [INFO] [stdout] 215 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let dir = direction.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/polygon.rs:230:17 [INFO] [stdout] | [INFO] [stdout] 230 | / if distance.is_none() || d < distance.unwrap() { [INFO] [stdout] 231 | | if !ignore_negative [INFO] [stdout] 232 | | || d > Zero::zero() [INFO] [stdout] 233 | | || abs_diff_eq!( [INFO] [stdout] ... | [INFO] [stdout] 241 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 230 ~ if (distance.is_none() || d < distance.unwrap()) { [INFO] [stdout] 231 ~ && (!ignore_negative [INFO] [stdout] 232 | || d > Zero::zero() [INFO] [stdout] ... [INFO] [stdout] 236 | epsilon = <::Point as Point2D>::value_epsilon() [INFO] [stdout] 237 ~ )) [INFO] [stdout] 238 | { [INFO] [stdout] 239 | distance = Some(d); [INFO] [stdout] 240 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/raster.rs:50:1 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn draw_line( [INFO] [stdout] 51 | | buffer: &mut Vec, [INFO] [stdout] 52 | | x1: i32, [INFO] [stdout] 53 | | y1: i32, [INFO] [stdout] ... | [INFO] [stdout] 58 | | height: usize, [INFO] [stdout] 59 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/raster.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | buffer: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - buffer: &mut Vec, [INFO] [stdout] 51 + buffer: &mut [u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/raster.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | buffer: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 154 - buffer: &mut Vec, [INFO] [stdout] 154 + buffer: &mut [u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/raster.rs:203:1 [INFO] [stdout] | [INFO] [stdout] 203 | / fn draw_polygon_graph_node( [INFO] [stdout] 204 | | buffer: &mut Vec, [INFO] [stdout] 205 | | piece: &PolygonGraph

, [INFO] [stdout] 206 | | node_index: NodeIndex, [INFO] [stdout] ... | [INFO] [stdout] 213 | |

::Segment: From<(

::Point,

::Point)>, [INFO] [stdout] 214 | |

::Point: From<(f64, f64)>, [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/raster.rs:217:12 [INFO] [stdout] | [INFO] [stdout] 217 | if piece.node_depth(node_index).unwrap() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `piece.node_depth(node_index).unwrap().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 unit return type [INFO] [stdout] --> src/raster.rs:422:35 [INFO] [stdout] | [INFO] [stdout] 422 | F: FnMut(usize, &mut Vec) -> (), [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/raster.rs:465:41 [INFO] [stdout] | [INFO] [stdout] 465 | contour.into_iter().tuple_windows().map(|(a, b)| { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 466 | | let slope = b - a; [INFO] [stdout] 467 | | let magnitude = slope.dot(&slope).sqrt(); [INFO] [stdout] 468 | | let n = magnitude / interval; [INFO] [stdout] ... | [INFO] [stdout] 474 | | }) [INFO] [stdout] 475 | | }).flatten().collect() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 465 ~ contour.into_iter().tuple_windows().flat_map(|(a, b)| { [INFO] [stdout] 466 + let slope = b - a; [INFO] [stdout] 467 + let magnitude = slope.dot(&slope).sqrt(); [INFO] [stdout] 468 + let n = magnitude / interval; [INFO] [stdout] 469 + let increment =

::Value::one() / n; [INFO] [stdout] 470 + [INFO] [stdout] 471 + (0..n.round().to_usize().unwrap()).map(move |x| { [INFO] [stdout] 472 + let scale = <

::Value as NumCast>::from(x).unwrap() * increment; [INFO] [stdout] 473 + a + slope * scale [INFO] [stdout] 474 + }) [INFO] [stdout] 475 ~ }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/segment.rs:118:16 [INFO] [stdout] | [INFO] [stdout] 118 | if overlaps.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `overlaps.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: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:121:61 [INFO] [stdout] | [INFO] [stdout] 121 | return SegmentSegmentIntersection::Touching(overlaps[0].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*overlaps[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | overlaps[0].clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*overlaps[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | overlaps[1].clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*overlaps[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/segment.rs:435:9 [INFO] [stdout] | [INFO] [stdout] 435 | / return distances [INFO] [stdout] 436 | | .into_iter() [INFO] [stdout] 437 | | .min_by(|a, b| a.partial_cmp(b).unwrap()); [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] 435 ~ distances [INFO] [stdout] 436 + .into_iter() [INFO] [stdout] 437 ~ .min_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/segment.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | / let Some(direction) = direction.normalized() else { [INFO] [stdout] 194 | | return None; [INFO] [stdout] 195 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let direction = direction.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | let reverse = -direction.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `direction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/segment.rs:268:13 [INFO] [stdout] | [INFO] [stdout] 268 | / let Some(ab_norm) = ab_norm.normalized() else { [INFO] [stdout] 269 | | return None; [INFO] [stdout] 270 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let ab_norm = ab_norm.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/segment.rs:272:13 [INFO] [stdout] | [INFO] [stdout] 272 | / let Some(ef_norm) = ef_norm.normalized() else { [INFO] [stdout] 273 | | return None; [INFO] [stdout] 274 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let ef_norm = ef_norm.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scale` [INFO] [stdout] --> src/raster.rs:416:5 [INFO] [stdout] | [INFO] [stdout] 416 | scale: f64, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scale` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> examples/rotate.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | let angle = (elapsed.as_secs_f64() * ROTATION_SPEED % (2.0 * PI)) as f64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(elapsed.as_secs_f64() * ROTATION_SPEED % (2.0 * PI))` [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: unused import: `babushka::polygon::Polygon as _` [INFO] [stdout] --> examples/union.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use babushka::polygon::Polygon as _; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/no_fit_polygon.rs:57:29 [INFO] [stdout] | [INFO] [stdout] 57 | let min_self_by_y = self_c [INFO] [stdout] | _____________________________^ [INFO] [stdout] 58 | | .iter_vertices() [INFO] [stdout] 59 | | .min_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 60 | | .unwrap() [INFO] [stdout] 61 | | .clone(); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 57 ~ let min_self_by_y = self_c [INFO] [stdout] 58 + .iter_vertices() [INFO] [stdout] 59 + .min_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 60 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/no_fit_polygon.rs:63:30 [INFO] [stdout] | [INFO] [stdout] 63 | let max_other_by_y = other [INFO] [stdout] | ______________________________^ [INFO] [stdout] 64 | | .iter_vertices() [INFO] [stdout] 65 | | .max_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 66 | | .unwrap() [INFO] [stdout] 67 | | .clone(); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 63 ~ let max_other_by_y = other [INFO] [stdout] 64 + .iter_vertices() [INFO] [stdout] 65 + .max_by(|a, b| a.y().partial_cmp(&b.y()).unwrap()) [INFO] [stdout] 66 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `draw_polygon_graph` [INFO] [stdout] --> examples/display_terashima.rs:5:58 [INFO] [stdout] | [INFO] [stdout] 5 | use babushka::raster::{draw_multi_polygon, draw_polygon, draw_polygon_graph, draw_text}; [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: `draw_polygon_graph` [INFO] [stdout] --> examples/piece.rs:4:44 [INFO] [stdout] | [INFO] [stdout] 4 | use babushka::raster::{draw_multi_polygon, draw_polygon_graph}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nfp` [INFO] [stdout] --> src/no_fit_polygon.rs:391:34 [INFO] [stdout] | [INFO] [stdout] 391 | for i in 0..nfp.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 391 - for i in 0..nfp.len() - 1 { [INFO] [stdout] 391 + for in nfp.iter().take(nfp.len() - 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/no_fit_polygon.rs:551:24 [INFO] [stdout] | [INFO] [stdout] 551 | if !(!abs_diff_eq!(d, Zero::zero(), epsilon = Self::value_epsilon()) [INFO] [stdout] | ________________________^ [INFO] [stdout] 552 | | && d > Zero::zero()) [INFO] [stdout] | |____________________________________________^ help: try: `abs_diff_eq!(d, Zero::zero(), epsilon = Self::value_epsilon()) || d <= Zero::zero()` [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: called `unwrap` on `d2` after checking its variant with `is_none` [INFO] [stdout] --> src/no_fit_polygon.rs:518:46 [INFO] [stdout] | [INFO] [stdout] 515 | } else if d2.is_none() { [INFO] [stdout] | --------------- help: try: `if let Some() = d2` [INFO] [stdout] ... [INFO] [stdout] 518 | Some(d1.unwrap().min(d2.unwrap())) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/no_fit_polygon.rs:434:22 [INFO] [stdout] | [INFO] [stdout] 434 | self_marked: &Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 434 ~ self_marked: &[bool], [INFO] [stdout] 435 | inside: bool, [INFO] [stdout] ... [INFO] [stdout] 439 | let mut other = other.clone(); [INFO] [stdout] 440 ~ let mut self_marked = self_marked.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/no_fit_polygon.rs:484:21 [INFO] [stdout] | [INFO] [stdout] 484 | / let Some(mut other_inside) = other_inside else { [INFO] [stdout] 485 | | return None; [INFO] [stdout] 486 | | }; [INFO] [stdout] | |______________________^ help: replace it with: `let mut other_inside = other_inside?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::f64::consts::PI` [INFO] [stdout] --> examples/nfp_hole.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::f64::consts::PI; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/parsers/terashima.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/parsers/terashima.rs:80:14 [INFO] [stdout] | [INFO] [stdout] 80 | .trim() [INFO] [stdout] | ______________^ [INFO] [stdout] 81 | | .split_whitespace() [INFO] [stdout] | |_____________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> examples/nfp_1_gif.rs:63:29 [INFO] [stdout] | [INFO] [stdout] 63 | interpolate_contour(x.into_iter(), 10.0) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> src/raster.rs:462:8 [INFO] [stdout] | [INFO] [stdout] 462 | I: IntoIterator, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 63 - interpolate_contour(x.into_iter(), 10.0) [INFO] [stdout] 63 + interpolate_contour(x, 10.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Self` which implements the `Copy` trait [INFO] [stdout] --> src/point.rs:68:25 [INFO] [stdout] | [INFO] [stdout] 68 | return Some(self.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> examples/nfp_1_gif.rs:89:53 [INFO] [stdout] | [INFO] [stdout] 89 | let offset = nfp_interp.iter().flatten().skip(frame_index).next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(frame_index)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Self` which implements the `Copy` trait [INFO] [stdout] --> src/point.rs:75:23 [INFO] [stdout] | [INFO] [stdout] 75 | let mut out = self.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/point.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | / if !abs_diff_eq!(self.y(), b.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 91 | | && !abs_diff_eq!(self.y(), a.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 92 | | && self.y() < b.y().max(a.y()) [INFO] [stdout] 93 | | && self.y() > b.y().min(a.y()) [INFO] [stdout] ... | [INFO] [stdout] 97 | | return false; [INFO] [stdout] 98 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 90 ~ return !abs_diff_eq!(self.y(), b.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 91 + && !abs_diff_eq!(self.y(), a.y(), epsilon = Self::value_epsilon()) [INFO] [stdout] 92 + && self.y() < b.y().max(a.y()) && self.y() > b.y().min(a.y()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/point.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | / if !abs_diff_eq!(self.x(), b.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 106 | | && !abs_diff_eq!(self.x(), a.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 107 | | && self.x() < b.x().max(a.x()) [INFO] [stdout] 108 | | && self.x() > b.x().min(a.x()) [INFO] [stdout] ... | [INFO] [stdout] 112 | | return false; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 105 ~ return !abs_diff_eq!(self.x(), b.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 106 + && !abs_diff_eq!(self.x(), a.x(), epsilon = Self::value_epsilon()) [INFO] [stdout] 107 + && self.x() < b.x().max(a.x()) && self.x() > b.x().min(a.x()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/point.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let Some(normal) = normal else { return None }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let normal = normal?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/polygon.rs:106:26 [INFO] [stdout] | [INFO] [stdout] 106 | let mut offset = self.offset().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.offset()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/polygon.rs:114:22 [INFO] [stdout] | [INFO] [stdout] 114 | let offset = self.offset().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.offset()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/polygon.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | / let Some(dir) = direction.normalized() else { [INFO] [stdout] 214 | | return None; [INFO] [stdout] 215 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let dir = direction.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/polygon.rs:230:17 [INFO] [stdout] | [INFO] [stdout] 230 | / if distance.is_none() || d < distance.unwrap() { [INFO] [stdout] 231 | | if !ignore_negative [INFO] [stdout] 232 | | || d > Zero::zero() [INFO] [stdout] 233 | | || abs_diff_eq!( [INFO] [stdout] ... | [INFO] [stdout] 241 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 230 ~ if (distance.is_none() || d < distance.unwrap()) { [INFO] [stdout] 231 ~ && (!ignore_negative [INFO] [stdout] 232 | || d > Zero::zero() [INFO] [stdout] ... [INFO] [stdout] 236 | epsilon = <::Point as Point2D>::value_epsilon() [INFO] [stdout] 237 ~ )) [INFO] [stdout] 238 | { [INFO] [stdout] 239 | distance = Some(d); [INFO] [stdout] 240 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/raster.rs:50:1 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn draw_line( [INFO] [stdout] 51 | | buffer: &mut Vec, [INFO] [stdout] 52 | | x1: i32, [INFO] [stdout] 53 | | y1: i32, [INFO] [stdout] ... | [INFO] [stdout] 58 | | height: usize, [INFO] [stdout] 59 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/raster.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | buffer: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - buffer: &mut Vec, [INFO] [stdout] 51 + buffer: &mut [u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/raster.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | buffer: &mut Vec, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 154 - buffer: &mut Vec, [INFO] [stdout] 154 + buffer: &mut [u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/raster.rs:203:1 [INFO] [stdout] | [INFO] [stdout] 203 | / fn draw_polygon_graph_node( [INFO] [stdout] 204 | | buffer: &mut Vec, [INFO] [stdout] 205 | | piece: &PolygonGraph

, [INFO] [stdout] 206 | | node_index: NodeIndex, [INFO] [stdout] ... | [INFO] [stdout] 213 | |

::Segment: From<(

::Point,

::Point)>, [INFO] [stdout] 214 | |

::Point: From<(f64, f64)>, [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/raster.rs:217:12 [INFO] [stdout] | [INFO] [stdout] 217 | if piece.node_depth(node_index).unwrap() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `piece.node_depth(node_index).unwrap().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 unit return type [INFO] [stdout] --> src/raster.rs:422:35 [INFO] [stdout] | [INFO] [stdout] 422 | F: FnMut(usize, &mut Vec) -> (), [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/raster.rs:465:41 [INFO] [stdout] | [INFO] [stdout] 465 | contour.into_iter().tuple_windows().map(|(a, b)| { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 466 | | let slope = b - a; [INFO] [stdout] 467 | | let magnitude = slope.dot(&slope).sqrt(); [INFO] [stdout] 468 | | let n = magnitude / interval; [INFO] [stdout] ... | [INFO] [stdout] 474 | | }) [INFO] [stdout] 475 | | }).flatten().collect() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 465 ~ contour.into_iter().tuple_windows().flat_map(|(a, b)| { [INFO] [stdout] 466 + let slope = b - a; [INFO] [stdout] 467 + let magnitude = slope.dot(&slope).sqrt(); [INFO] [stdout] 468 + let n = magnitude / interval; [INFO] [stdout] 469 + let increment =

::Value::one() / n; [INFO] [stdout] 470 + [INFO] [stdout] 471 + (0..n.round().to_usize().unwrap()).map(move |x| { [INFO] [stdout] 472 + let scale = <

::Value as NumCast>::from(x).unwrap() * increment; [INFO] [stdout] 473 + a + slope * scale [INFO] [stdout] 474 + }) [INFO] [stdout] 475 ~ }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/segment.rs:118:16 [INFO] [stdout] | [INFO] [stdout] 118 | if overlaps.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `overlaps.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: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:121:61 [INFO] [stdout] | [INFO] [stdout] 121 | return SegmentSegmentIntersection::Touching(overlaps[0].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*overlaps[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | overlaps[0].clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*overlaps[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | overlaps[1].clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*overlaps[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/segment.rs:435:9 [INFO] [stdout] | [INFO] [stdout] 435 | / return distances [INFO] [stdout] 436 | | .into_iter() [INFO] [stdout] 437 | | .min_by(|a, b| a.partial_cmp(b).unwrap()); [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] 435 ~ distances [INFO] [stdout] 436 + .into_iter() [INFO] [stdout] 437 ~ .min_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/segment.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | / let Some(direction) = direction.normalized() else { [INFO] [stdout] 194 | | return None; [INFO] [stdout] 195 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let direction = direction.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `::Point` which implements the `Copy` trait [INFO] [stdout] --> src/segment.rs:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | let reverse = -direction.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `direction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/segment.rs:268:13 [INFO] [stdout] | [INFO] [stdout] 268 | / let Some(ab_norm) = ab_norm.normalized() else { [INFO] [stdout] 269 | | return None; [INFO] [stdout] 270 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let ab_norm = ab_norm.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/segment.rs:272:13 [INFO] [stdout] | [INFO] [stdout] 272 | / let Some(ef_norm) = ef_norm.normalized() else { [INFO] [stdout] 273 | | return None; [INFO] [stdout] 274 | | }; [INFO] [stdout] | |______________^ help: replace it with: `let ef_norm = ef_norm.normalized()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/clip.rs:209:24 [INFO] [stdout] | [INFO] [stdout] 209 | let expected = vec![Polygon { [INFO] [stdout] | ________________________^ [INFO] [stdout] 210 | | vertices: vec![ [INFO] [stdout] 211 | | Point2D { x: 50.0, y: 15.0 }, [INFO] [stdout] 212 | | Point2D { x: 40.0, y: 22.5 }, [INFO] [stdout] ... | [INFO] [stdout] 221 | | rotation: 0.0, [INFO] [stdout] 222 | | }]; [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] 209 ~ let expected = [Polygon { [INFO] [stdout] 210 + vertices: vec![ [INFO] [stdout] 211 + Point2D { x: 50.0, y: 15.0 }, [INFO] [stdout] 212 + Point2D { x: 40.0, y: 22.5 }, [INFO] [stdout] 213 + Point2D { x: 40.0, y: 20.0 }, [INFO] [stdout] 214 + Point2D { x: 20.0, y: 20.0 }, [INFO] [stdout] 215 + Point2D { x: 20.0, y: 40.0 }, [INFO] [stdout] 216 + Point2D { x: 40.0, y: 40.0 }, [INFO] [stdout] 217 + Point2D { x: 40.0, y: 37.5 }, [INFO] [stdout] 218 + Point2D { x: 50.0, y: 45.0 }, [INFO] [stdout] 219 + ], [INFO] [stdout] 220 + offset: Point2D::from_xy(0.0, 0.0), [INFO] [stdout] 221 + rotation: 0.0, [INFO] [stdout] 222 ~ }]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 46.11s [INFO] running `Command { std: "docker" "inspect" "0a394bacff02452162bdcdfbf7329197887ca8c6eb8f2d1a556130e1d9a3671b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0a394bacff02452162bdcdfbf7329197887ca8c6eb8f2d1a556130e1d9a3671b", kill_on_drop: false }` [INFO] [stdout] 0a394bacff02452162bdcdfbf7329197887ca8c6eb8f2d1a556130e1d9a3671b