[INFO] fetching crate cgar 0.2.0... [INFO] linting cgar-0.2.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate cgar 0.2.0 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate cgar 0.2.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate cgar 0.2.0 [INFO] tweaked toml for crates.io crate cgar 0.2.0 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate cgar 0.2.0 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 cgar 0.2.0 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 az v1.2.1 [INFO] [stderr] Downloaded zerocopy-derive v0.8.26 [INFO] [stderr] Downloaded rand v0.9.1 [INFO] [stderr] Downloaded zerocopy v0.8.26 [INFO] [stderr] Downloaded rug v1.27.0 [INFO] [stderr] Downloaded gmp-mpfr-sys v1.6.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 87e5095563201f71597022df4321e7ec330106c05c436c1e933714ee7ee3a3c9 [INFO] running `Command { std: "docker" "start" "-a" "87e5095563201f71597022df4321e7ec330106c05c436c1e933714ee7ee3a3c9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "87e5095563201f71597022df4321e7ec330106c05c436c1e933714ee7ee3a3c9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "87e5095563201f71597022df4321e7ec330106c05c436c1e933714ee7ee3a3c9", kill_on_drop: false }` [INFO] [stdout] 87e5095563201f71597022df4321e7ec330106c05c436c1e933714ee7ee3a3c9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f656b3fb9b7817a628984b3d3584f75c07a559a9d721c22c2323476922ae53cf [INFO] running `Command { std: "docker" "start" "-a" "f656b3fb9b7817a628984b3d3584f75c07a559a9d721c22c2323476922ae53cf", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling zerocopy v0.8.26 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking cfg-if v1.0.1 [INFO] [stderr] Compiling gmp-mpfr-sys v1.6.5 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Compiling az v1.2.1 [INFO] [stderr] Compiling rug v1.27.0 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking cgar v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/geometry/matrix.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | pub fn cast(&self) -> Matrix [INFO] [stdout] | ^ [INFO] [stdout] 54 | where [INFO] [stdout] 55 | U: 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: bound is defined in more than one place [INFO] [stdout] --> src/geometry/point.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | fn cast(&self) -> Self::With [INFO] [stdout] | ^ [INFO] [stdout] 94 | where [INFO] [stdout] 95 | U: 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] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/geometry/spatial_element.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | fn cast(&self) -> Self::With [INFO] [stdout] | ^ [INFO] [stdout] 55 | where [INFO] [stdout] 56 | U: 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] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/geometry/vector.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | fn cast(&self) -> Self::With [INFO] [stdout] | ^ [INFO] [stdout] 79 | where [INFO] [stdout] 80 | U: 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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/core.rs:1272:13 [INFO] [stdout] | [INFO] [stdout] 1272 | face: face, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `face` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/mesh/core.rs:1465:35 [INFO] [stdout] | [INFO] [stdout] 1465 | pub fn compute_triangle_aabb_fast( [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 1471 | T: 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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/intersection_segment.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | faces_hint: faces_hint, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `faces_hint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/intersection_segment.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | a: a, [INFO] [stdout] | ^^^^ help: replace it with: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/intersection_segment.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | b: b, [INFO] [stdout] | ^^^^ help: replace it with: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after outer attribute [INFO] [stdout] --> src/mesh/topology.rs:133:5 [INFO] [stdout] | [INFO] [stdout] 133 | / /// Find existing vertex near position using spatial hash [INFO] [stdout] ... | [INFO] [stdout] 158 | | [INFO] [stdout] | |_^ [INFO] [stdout] 159 | pub fn faces_containing_point_aabb( [INFO] [stdout] | ---------------------------------- the attribute applies to this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/geometry/matrix.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | pub fn cast(&self) -> Matrix [INFO] [stdout] | ^ [INFO] [stdout] 54 | where [INFO] [stdout] 55 | U: 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: bound is defined in more than one place [INFO] [stdout] --> src/geometry/point.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | fn cast(&self) -> Self::With [INFO] [stdout] | ^ [INFO] [stdout] 94 | where [INFO] [stdout] 95 | U: 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] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/geometry/spatial_element.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | fn cast(&self) -> Self::With [INFO] [stdout] | ^ [INFO] [stdout] 55 | where [INFO] [stdout] 56 | U: 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] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/geometry/vector.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | fn cast(&self) -> Self::With [INFO] [stdout] | ^ [INFO] [stdout] 79 | where [INFO] [stdout] 80 | U: 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] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/mesh/mod.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | impl crate::mesh::basic_types::Mesh [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `io::obj::write_obj` [INFO] [stdout] --> src/mesh_processing/remesh.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | io::obj::write_obj, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/core.rs:1272:13 [INFO] [stdout] | [INFO] [stdout] 1272 | face: face, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `face` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/mesh/core.rs:1465:35 [INFO] [stdout] | [INFO] [stdout] 1465 | pub fn compute_triangle_aabb_fast( [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 1471 | T: 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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/intersection_segment.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | faces_hint: faces_hint, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `faces_hint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/intersection_segment.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | a: a, [INFO] [stdout] | ^^^^ help: replace it with: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mesh/intersection_segment.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | b: b, [INFO] [stdout] | ^^^^ help: replace it with: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after outer attribute [INFO] [stdout] --> src/mesh/topology.rs:133:5 [INFO] [stdout] | [INFO] [stdout] 133 | / /// Find existing vertex near position using spatial hash [INFO] [stdout] ... | [INFO] [stdout] 158 | | [INFO] [stdout] | |_^ [INFO] [stdout] 159 | pub fn faces_containing_point_aabb( [INFO] [stdout] | ---------------------------------- the attribute applies to this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/mesh/mod.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | impl crate::mesh::basic_types::Mesh [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `io::obj::write_obj` [INFO] [stdout] --> src/mesh_processing/remesh.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | io::obj::write_obj, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/geometry/aabb_tree.rs:178:17 [INFO] [stdout] | [INFO] [stdout] 178 | / if let Some(definitely_no_intersect) = aabb.intersects_approx(q_exact) { [INFO] [stdout] 179 | | if !definitely_no_intersect { [INFO] [stdout] 180 | | return; [INFO] [stdout] 181 | | } [INFO] [stdout] 182 | | } [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] 178 ~ if let Some(definitely_no_intersect) = aabb.intersects_approx(q_exact) [INFO] [stdout] 179 ~ && !definitely_no_intersect { [INFO] [stdout] 180 | return; [INFO] [stdout] 181 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/geometry/aabb_tree.rs:605:5 [INFO] [stdout] | [INFO] [stdout] 605 | / if let Some(mn) = aabb.min[axis].as_f64_fast() { [INFO] [stdout] 606 | | if let Some(mx) = aabb.max[axis].as_f64_fast() { [INFO] [stdout] 607 | | return 0.5 * (mn + mx); [INFO] [stdout] 608 | | } [INFO] [stdout] 609 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 605 ~ if let Some(mn) = aabb.min[axis].as_f64_fast() [INFO] [stdout] 606 ~ && let Some(mx) = aabb.max[axis].as_f64_fast() { [INFO] [stdout] 607 | return 0.5 * (mn + mx); [INFO] [stdout] 608 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:122:26 [INFO] [stdout] | [INFO] [stdout] 122 | if are_collinear(&a, &b, &c) { [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:122:30 [INFO] [stdout] | [INFO] [stdout] 122 | if are_collinear(&a, &b, &c) { [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:122:34 [INFO] [stdout] | [INFO] [stdout] 122 | if are_collinear(&a, &b, &c) { [INFO] [stdout] | ^^ help: change this to: `c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:136:35 [INFO] [stdout] | [INFO] [stdout] 136 | let s = Segment2::new(&pts[1], &pts[2]); [INFO] [stdout] | ^^^^^^^ help: change this to: `pts[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:136:44 [INFO] [stdout] | [INFO] [stdout] 136 | let s = Segment2::new(&pts[1], &pts[2]); [INFO] [stdout] | ^^^^^^^ help: change this to: `pts[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:185:6 [INFO] [stdout] | [INFO] [stdout] 185 | impl<'a, 'b, T, const R: usize, const C: usize> Add<&'b Matrix> for &'a Matrix [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 185 - impl<'a, 'b, T, const R: usize, const C: usize> Add<&'b Matrix> for &'a Matrix [INFO] [stdout] 185 + impl<'b, T, const R: usize, const C: usize> Add<&'b Matrix> for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:213:6 [INFO] [stdout] | [INFO] [stdout] 213 | impl<'a, 'b, T, const R: usize, const C: usize> Sub<&'b Matrix> for &'a Matrix [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 213 - impl<'a, 'b, T, const R: usize, const C: usize> Sub<&'b Matrix> for &'a Matrix [INFO] [stdout] 213 + impl<'b, T, const R: usize, const C: usize> Sub<&'b Matrix> for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:304:6 [INFO] [stdout] | [INFO] [stdout] 304 | impl<'a, 'b, T, const R: usize, const C: usize> Mul<&'b Vector> for &'a Matrix [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 304 - impl<'a, 'b, T, const R: usize, const C: usize> Mul<&'b Vector> for &'a Matrix [INFO] [stdout] 304 + impl<'b, T, const R: usize, const C: usize> Mul<&'b Vector> for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:341:6 [INFO] [stdout] | [INFO] [stdout] 341 | impl<'a, 'b, T, const R: usize, const C: usize, const K: usize> Mul<&'b Matrix> [INFO] [stdout] | ^^ [INFO] [stdout] 342 | for &'a Matrix [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 341 ~ impl<'b, T, const R: usize, const C: usize, const K: usize> Mul<&'b Matrix> [INFO] [stdout] 342 ~ for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/geometry/matrix.rs:487:1 [INFO] [stdout] | [INFO] [stdout] 487 | impl Into<[[T; C]; R]> for Matrix { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 487 ~ impl From> for [[T; C]; R] { [INFO] [stdout] 488 | #[inline] [INFO] [stdout] 489 ~ fn from(val: Matrix) -> Self { [INFO] [stdout] 490 ~ val.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/point.rs:113:6 [INFO] [stdout] | [INFO] [stdout] 113 | impl<'a, 'b, T, const N: usize> Add<&'b Point> for &'a Point [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 113 - impl<'a, 'b, T, const N: usize> Add<&'b Point> for &'a Point [INFO] [stdout] 113 + impl<'b, T, const N: usize> Add<&'b Point> for &Point [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/point.rs:139:6 [INFO] [stdout] | [INFO] [stdout] 139 | impl<'a, 'b, T, const N: usize> Sub<&'b Point> for &'a Point [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 139 - impl<'a, 'b, T, const N: usize> Sub<&'b Point> for &'a Point [INFO] [stdout] 139 + impl<'b, T, const N: usize> Sub<&'b Point> for &Point [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/geometry/point.rs:336:1 [INFO] [stdout] | [INFO] [stdout] 336 | impl Into<[T; N]> for Point { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 336 ~ impl From> for [T; N] { [INFO] [stdout] 337 ~ fn from(val: Point) -> Self { [INFO] [stdout] 338 ~ val.coords [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/geometry/segment.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | / pub fn default() -> Self { [INFO] [stdout] 72 | | Self { [INFO] [stdout] 73 | | a: Point::default(), [INFO] [stdout] 74 | | b: Point::default(), [INFO] [stdout] 75 | | } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/segment.rs:126:24 [INFO] [stdout] | [INFO] [stdout] 126 | if (&t - &prev_t).abs() > T::from(EPS) { [INFO] [stdout] | ^^^^^^-------^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `prev_t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/segment.rs:126:30 [INFO] [stdout] | [INFO] [stdout] 126 | if (&t - &prev_t).abs() > T::from(EPS) { [INFO] [stdout] | ^^^^^^^ help: change this to: `prev_t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:31 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:60 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:65 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:31 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:36 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:60 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:65 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:177:20 [INFO] [stdout] | [INFO] [stdout] 177 | let t1 = [to2d(&p[2]), to2d(&p[0]), to2d(&p[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `p[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:177:33 [INFO] [stdout] | [INFO] [stdout] 177 | let t1 = [to2d(&p[2]), to2d(&p[0]), to2d(&p[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `p[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:177:46 [INFO] [stdout] | [INFO] [stdout] 177 | let t1 = [to2d(&p[2]), to2d(&p[0]), to2d(&p[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `p[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:178:20 [INFO] [stdout] | [INFO] [stdout] 178 | let t2 = [to2d(&q[2]), to2d(&q[0]), to2d(&q[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `q[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:178:33 [INFO] [stdout] | [INFO] [stdout] 178 | let t2 = [to2d(&q[2]), to2d(&q[0]), to2d(&q[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `q[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:178:46 [INFO] [stdout] | [INFO] [stdout] 178 | let t2 = [to2d(&q[2]), to2d(&q[0]), to2d(&q[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `q[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:200:65 [INFO] [stdout] | [INFO] [stdout] 200 | pts.push(back_project_to_3d(&s.a, i0, i1, drop, &p[2])); [INFO] [stdout] | ^^^^^ help: change this to: `p[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `convex_hull_2d_indices` doesn't need a mutable reference [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:227:51 [INFO] [stdout] | [INFO] [stdout] 227 | let hull_idx = convex_hull_2d_indices(&mut pts2d); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 227 - let hull_idx = convex_hull_2d_indices(&mut pts2d); [INFO] [stdout] 227 + let hull_idx = convex_hull_2d_indices(&pts2d); [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/geometry/tri_tri_intersect.rs:243:39 [INFO] [stdout] | [INFO] [stdout] 243 | pub fn convex_hull_2d_indices(pts: &Vec>) -> 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] 243 - pub fn convex_hull_2d_indices(pts: &Vec>) -> Vec [INFO] [stdout] 243 + pub fn convex_hull_2d_indices(pts: &[Point2]) -> Vec [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | return uniq.len(); [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] 448 - return uniq.len(); [INFO] [stdout] 448 + uniq.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1369:58 [INFO] [stdout] | [INFO] [stdout] 1369 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1370:58 [INFO] [stdout] | [INFO] [stdout] 1370 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1371:58 [INFO] [stdout] | [INFO] [stdout] 1371 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1372:58 [INFO] [stdout] | [INFO] [stdout] 1372 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1407:62 [INFO] [stdout] | [INFO] [stdout] 1407 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1408:62 [INFO] [stdout] | [INFO] [stdout] 1408 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1409:62 [INFO] [stdout] | [INFO] [stdout] 1409 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1410:62 [INFO] [stdout] | [INFO] [stdout] 1410 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1431:66 [INFO] [stdout] | [INFO] [stdout] 1431 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1432:66 [INFO] [stdout] | [INFO] [stdout] 1432 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1433:66 [INFO] [stdout] | [INFO] [stdout] 1433 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1434:66 [INFO] [stdout] | [INFO] [stdout] 1434 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1482:23 [INFO] [stdout] | [INFO] [stdout] 1482 | } else if (&(&t - &T::one())).is_zero() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `(&t - &T::one())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1492:56 [INFO] [stdout] | [INFO] [stdout] 1492 | let on_q = classify_on_tri::(&ip, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1528:58 [INFO] [stdout] | [INFO] [stdout] 1528 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1529:58 [INFO] [stdout] | [INFO] [stdout] 1529 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1530:58 [INFO] [stdout] | [INFO] [stdout] 1530 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1531:58 [INFO] [stdout] | [INFO] [stdout] 1531 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1576:27 [INFO] [stdout] | [INFO] [stdout] 1576 | } else if (&(&u - &T::one())).is_zero() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `(&u - &T::one())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1586:60 [INFO] [stdout] | [INFO] [stdout] 1586 | let on_p = classify_on_tri::(&iq, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/util.rs:251:14 [INFO] [stdout] | [INFO] [stdout] 251 | let v2 = &proj - &a; [INFO] [stdout] | ^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:251:22 [INFO] [stdout] | [INFO] [stdout] 251 | let v2 = &proj - &a; [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:358:20 [INFO] [stdout] | [INFO] [stdout] 358 | let dd = d.dot(&d); [INFO] [stdout] | ^^ help: change this to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/util.rs:359:8 [INFO] [stdout] | [INFO] [stdout] 359 | if &dd <= &eps { [INFO] [stdout] | ^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:359:15 [INFO] [stdout] | [INFO] [stdout] 359 | if &dd <= &eps { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:362:21 [INFO] [stdout] | [INFO] [stdout] 362 | d.scale(&(v.dot(&d) / dd)) [INFO] [stdout] | ^^ help: change this to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:380:19 [INFO] [stdout] | [INFO] [stdout] 380 | a + &ab.scale(&u).0 [INFO] [stdout] | ^^ help: change this to: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/vector.rs:116:6 [INFO] [stdout] | [INFO] [stdout] 116 | impl<'a, 'b, T, const N: usize> Add<&'b Vector> for &'a Vector [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 116 - impl<'a, 'b, T, const N: usize> Add<&'b Vector> for &'a Vector [INFO] [stdout] 116 + impl<'b, T, const N: usize> Add<&'b Vector> for &Vector [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/vector.rs:142:6 [INFO] [stdout] | [INFO] [stdout] 142 | impl<'a, 'b, T, const N: usize> Sub<&'b Vector> for &'a Vector [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 142 - impl<'a, 'b, T, const N: usize> Sub<&'b Vector> for &'a Vector [INFO] [stdout] 142 + impl<'b, T, const N: usize> Sub<&'b Vector> for &Vector [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:187:46 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:187:57 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:187:61 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:187:72 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:234:13 [INFO] [stdout] | [INFO] [stdout] 234 | &self[0] * &s, [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:234:24 [INFO] [stdout] | [INFO] [stdout] 234 | &self[0] * &s, [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:235:13 [INFO] [stdout] | [INFO] [stdout] 235 | &self[1] * &s, [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:235:24 [INFO] [stdout] | [INFO] [stdout] 235 | &self[1] * &s, [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:236:13 [INFO] [stdout] | [INFO] [stdout] 236 | &self[2] * &s, [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:236:24 [INFO] [stdout] | [INFO] [stdout] 236 | &self[2] * &s, [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/geometry/vector.rs:298:1 [INFO] [stdout] | [INFO] [stdout] 298 | impl Into<[T; N]> for Vector { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 298 ~ impl From> for [T; N] { [INFO] [stdout] 299 ~ fn from(val: Vector) -> Self { [INFO] [stdout] 300 ~ val.0.coords [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/kernel/mod.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | pub mod kernel; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/kernel/predicates.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return true; [INFO] [stdout] 52 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/kernel/predicates.rs:435:9 [INFO] [stdout] | [INFO] [stdout] 435 | return classify_from_edges(&e0, &e1, &e2); [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] 435 - return classify_from_edges(&e0, &e1, &e2); [INFO] [stdout] 435 + classify_from_edges(&e0, &e1, &e2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/kernel/predicates.rs:465:9 [INFO] [stdout] | [INFO] [stdout] 465 | return classify_from_edges(&e0, &e1, &e2); [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] 465 - return classify_from_edges(&e0, &e1, &e2); [INFO] [stdout] 465 + classify_from_edges(&e0, &e1, &e2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:554:12 [INFO] [stdout] | [INFO] [stdout] 554 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:557:12 [INFO] [stdout] | [INFO] [stdout] 557 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:557:21 [INFO] [stdout] | [INFO] [stdout] 557 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:560:12 [INFO] [stdout] | [INFO] [stdout] 560 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:560:21 [INFO] [stdout] | [INFO] [stdout] 560 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^ help: change this to: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:599:33 [INFO] [stdout] | [INFO] [stdout] 599 | Point2::::from_vals([minx.clone(), miny.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:599:47 [INFO] [stdout] | [INFO] [stdout] 599 | Point2::::from_vals([minx.clone(), miny.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `miny` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:600:33 [INFO] [stdout] | [INFO] [stdout] 600 | Point2::::from_vals([maxx.clone(), maxy.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxx` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:600:47 [INFO] [stdout] | [INFO] [stdout] 600 | Point2::::from_vals([maxx.clone(), maxy.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxy` [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: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:620:12 [INFO] [stdout] | [INFO] [stdout] 620 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:620:21 [INFO] [stdout] | [INFO] [stdout] 620 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:623:12 [INFO] [stdout] | [INFO] [stdout] 623 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:623:21 [INFO] [stdout] | [INFO] [stdout] 623 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:626:12 [INFO] [stdout] | [INFO] [stdout] 626 | if (&p[2] - &minz).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `minz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:626:21 [INFO] [stdout] | [INFO] [stdout] 626 | if (&p[2] - &minz).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `minz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:629:12 [INFO] [stdout] | [INFO] [stdout] 629 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:629:21 [INFO] [stdout] | [INFO] [stdout] 629 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^ help: change this to: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:635:12 [INFO] [stdout] | [INFO] [stdout] 635 | if (&p[2] - &maxz).is_positive() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `maxz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:635:21 [INFO] [stdout] | [INFO] [stdout] 635 | if (&p[2] - &maxz).is_positive() { [INFO] [stdout] | ^^^^^ help: change this to: `maxz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:679:33 [INFO] [stdout] | [INFO] [stdout] 679 | Point3::::from_vals([minx.clone(), miny.clone(), minz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `minx` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:679:47 [INFO] [stdout] | [INFO] [stdout] 679 | Point3::::from_vals([minx.clone(), miny.clone(), minz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `miny` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:679:61 [INFO] [stdout] | [INFO] [stdout] 679 | Point3::::from_vals([minx.clone(), miny.clone(), minz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `minz` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:680:33 [INFO] [stdout] | [INFO] [stdout] 680 | Point3::::from_vals([maxx.clone(), maxy.clone(), maxz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxx` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:680:47 [INFO] [stdout] | [INFO] [stdout] 680 | Point3::::from_vals([maxx.clone(), maxy.clone(), maxz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxy` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:680:61 [INFO] [stdout] | [INFO] [stdout] 680 | Point3::::from_vals([maxx.clone(), maxy.clone(), maxz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxz` [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` statement can be collapsed [INFO] [stdout] --> src/geometry/aabb_tree.rs:178:17 [INFO] [stdout] | [INFO] [stdout] 178 | / if let Some(definitely_no_intersect) = aabb.intersects_approx(q_exact) { [INFO] [stdout] 179 | | if !definitely_no_intersect { [INFO] [stdout] 180 | | return; [INFO] [stdout] 181 | | } [INFO] [stdout] 182 | | } [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] 178 ~ if let Some(definitely_no_intersect) = aabb.intersects_approx(q_exact) [INFO] [stdout] 179 ~ && !definitely_no_intersect { [INFO] [stdout] 180 | return; [INFO] [stdout] 181 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/geometry/aabb_tree.rs:605:5 [INFO] [stdout] | [INFO] [stdout] 605 | / if let Some(mn) = aabb.min[axis].as_f64_fast() { [INFO] [stdout] 606 | | if let Some(mx) = aabb.max[axis].as_f64_fast() { [INFO] [stdout] 607 | | return 0.5 * (mn + mx); [INFO] [stdout] 608 | | } [INFO] [stdout] 609 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 605 ~ if let Some(mn) = aabb.min[axis].as_f64_fast() [INFO] [stdout] 606 ~ && let Some(mx) = aabb.max[axis].as_f64_fast() { [INFO] [stdout] 607 | return 0.5 * (mn + mx); [INFO] [stdout] 608 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:122:26 [INFO] [stdout] | [INFO] [stdout] 122 | if are_collinear(&a, &b, &c) { [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:122:30 [INFO] [stdout] | [INFO] [stdout] 122 | if are_collinear(&a, &b, &c) { [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:122:34 [INFO] [stdout] | [INFO] [stdout] 122 | if are_collinear(&a, &b, &c) { [INFO] [stdout] | ^^ help: change this to: `c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:136:35 [INFO] [stdout] | [INFO] [stdout] 136 | let s = Segment2::new(&pts[1], &pts[2]); [INFO] [stdout] | ^^^^^^^ help: change this to: `pts[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/intersection.rs:136:44 [INFO] [stdout] | [INFO] [stdout] 136 | let s = Segment2::new(&pts[1], &pts[2]); [INFO] [stdout] | ^^^^^^^ help: change this to: `pts[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `crate::mesh::basic_types::Mesh` [INFO] [stdout] --> src/mesh/core.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / pub fn new() -> Self { [INFO] [stdout] 45 | | let s = Self { [INFO] [stdout] 46 | | vertices: Vec::new(), [INFO] [stdout] 47 | | half_edges: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 57 | | s.with_default_hash() [INFO] [stdout] 58 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] --> src/mesh/mod.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 ~ impl Default for crate::mesh::basic_types::Mesh [INFO] [stdout] 38 + where [INFO] [stdout] 39 + crate::geometry::point::Point: crate::geometry::point::PointOps>, [INFO] [stdout] 40 + crate::geometry::vector::Vector: crate::geometry::vector::VectorOps, [INFO] [stdout] 41 + for<'a> &'a T: std::ops::Sub<&'a T, Output = T> [INFO] [stdout] 42 + + std::ops::Mul<&'a T, Output = T> [INFO] [stdout] 43 + + std::ops::Add<&'a T, Output = T> [INFO] [stdout] 44 + + std::ops::Div<&'a T, Output = T> [INFO] [stdout] 45 + + std::ops::Neg, [INFO] [stdout] 46 + { [INFO] [stdout] 47 + fn default() -> Self { [INFO] [stdout] 48 + Self::new() [INFO] [stdout] 49 + } [INFO] [stdout] 50 + } [INFO] [stdout] 51 + [INFO] [stdout] 52 ~ impl crate::mesh::basic_types::Mesh [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/mesh/core.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | .expect(&format!( [INFO] [stdout] | __________________^ [INFO] [stdout] 81 | | "Edge map must contain the segment vertices pair. Segment {}\n{:?}", [INFO] [stdout] 82 | | seg_idx, seg [INFO] [stdout] 83 | | )); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ .unwrap_or_else(|| panic!("Edge map must contain the segment vertices pair. Segment {}\n{:?}", [INFO] [stdout] 81 ~ seg_idx, seg)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/mesh/core.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | / let mut borders: Vec = Vec::new(); [INFO] [stdout] 108 | | borders.reserve(m); [INFO] [stdout] | |___________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut borders: Vec = Vec::with_capacity(m);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:185:6 [INFO] [stdout] | [INFO] [stdout] 185 | impl<'a, 'b, T, const R: usize, const C: usize> Add<&'b Matrix> for &'a Matrix [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 185 - impl<'a, 'b, T, const R: usize, const C: usize> Add<&'b Matrix> for &'a Matrix [INFO] [stdout] 185 + impl<'b, T, const R: usize, const C: usize> Add<&'b Matrix> for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:213:6 [INFO] [stdout] | [INFO] [stdout] 213 | impl<'a, 'b, T, const R: usize, const C: usize> Sub<&'b Matrix> for &'a Matrix [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 213 - impl<'a, 'b, T, const R: usize, const C: usize> Sub<&'b Matrix> for &'a Matrix [INFO] [stdout] 213 + impl<'b, T, const R: usize, const C: usize> Sub<&'b Matrix> for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:204:25 [INFO] [stdout] | [INFO] [stdout] 204 | / if twin_idx != usize::MAX && twin_idx < self.half_edges.len() { [INFO] [stdout] 205 | | if let Some(twin_face) = self.half_edges[twin_idx].face { [INFO] [stdout] 206 | | if twin_face != face_idx [INFO] [stdout] 207 | | && twin_face < self.faces.len() [INFO] [stdout] ... | [INFO] [stdout] 213 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 204 ~ if twin_idx != usize::MAX && twin_idx < self.half_edges.len() [INFO] [stdout] 205 ~ && let Some(twin_face) = self.half_edges[twin_idx].face { [INFO] [stdout] 206 | if twin_face != face_idx [INFO] [stdout] ... [INFO] [stdout] 211 | } [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:205:29 [INFO] [stdout] | [INFO] [stdout] 205 | / ... if let Some(twin_face) = self.half_edges[twin_idx].face { [INFO] [stdout] 206 | | ... if twin_face != face_idx [INFO] [stdout] 207 | | ... && twin_face < self.faces.len() [INFO] [stdout] 208 | | ... && self.faces[twin_face].half_edge != usize::MAX [INFO] [stdout] ... | [INFO] [stdout] 212 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 205 ~ if let Some(twin_face) = self.half_edges[twin_idx].face [INFO] [stdout] 206 ~ && twin_face != face_idx [INFO] [stdout] 207 | && twin_face < self.faces.len() [INFO] [stdout] ... [INFO] [stdout] 210 | adjacent_faces.push(twin_face); [INFO] [stdout] 211 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:304:6 [INFO] [stdout] | [INFO] [stdout] 304 | impl<'a, 'b, T, const R: usize, const C: usize> Mul<&'b Vector> for &'a Matrix [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 304 - impl<'a, 'b, T, const R: usize, const C: usize> Mul<&'b Vector> for &'a Matrix [INFO] [stdout] 304 + impl<'b, T, const R: usize, const C: usize> Mul<&'b Vector> for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/matrix.rs:341:6 [INFO] [stdout] | [INFO] [stdout] 341 | impl<'a, 'b, T, const R: usize, const C: usize, const K: usize> Mul<&'b Matrix> [INFO] [stdout] | ^^ [INFO] [stdout] 342 | for &'a Matrix [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 341 ~ impl<'b, T, const R: usize, const C: usize, const K: usize> Mul<&'b Matrix> [INFO] [stdout] 342 ~ for &Matrix [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:333:13 [INFO] [stdout] | [INFO] [stdout] 333 | / if old_vertex < old_to_new.len() { [INFO] [stdout] 334 | | if let Some(&new_vertex) = old_to_new.get(old_vertex) { [INFO] [stdout] 335 | | if new_vertex != usize::MAX { [INFO] [stdout] 336 | | half_edge.vertex = new_vertex; [INFO] [stdout] ... | [INFO] [stdout] 339 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 333 ~ if old_vertex < old_to_new.len() [INFO] [stdout] 334 ~ && let Some(&new_vertex) = old_to_new.get(old_vertex) { [INFO] [stdout] 335 | if new_vertex != usize::MAX { [INFO] [stdout] 336 | half_edge.vertex = new_vertex; [INFO] [stdout] 337 | } [INFO] [stdout] 338 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | / if let Some(&new_vertex) = old_to_new.get(old_vertex) { [INFO] [stdout] 335 | | if new_vertex != usize::MAX { [INFO] [stdout] 336 | | half_edge.vertex = new_vertex; [INFO] [stdout] 337 | | } [INFO] [stdout] 338 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 334 ~ if let Some(&new_vertex) = old_to_new.get(old_vertex) [INFO] [stdout] 335 ~ && new_vertex != usize::MAX { [INFO] [stdout] 336 | half_edge.vertex = new_vertex; [INFO] [stdout] 337 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mesh/core.rs:438:50 [INFO] [stdout] | [INFO] [stdout] 438 | pub fn build_face_tree_with_lookup(&self) -> (AabbTree, usize>, Vec>>) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/geometry/matrix.rs:487:1 [INFO] [stdout] | [INFO] [stdout] 487 | impl Into<[[T; C]; R]> for Matrix { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 487 ~ impl From> for [[T; C]; R] { [INFO] [stdout] 488 | #[inline] [INFO] [stdout] 489 ~ fn from(val: Matrix) -> Self { [INFO] [stdout] 490 ~ val.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | / if let Some(&eidx) = self.edge_map.get(&(c, d)) { [INFO] [stdout] 638 | | if eidx != he_ab && eidx != he_ba { [INFO] [stdout] 639 | | return Err("flip_edge: duplicate edge (c,d)"); [INFO] [stdout] 640 | | } [INFO] [stdout] 641 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 637 ~ if let Some(&eidx) = self.edge_map.get(&(c, d)) [INFO] [stdout] 638 ~ && eidx != he_ab && eidx != he_ba { [INFO] [stdout] 639 | return Err("flip_edge: duplicate edge (c,d)"); [INFO] [stdout] 640 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:642:9 [INFO] [stdout] | [INFO] [stdout] 642 | / if let Some(&eidx) = self.edge_map.get(&(d, c)) { [INFO] [stdout] 643 | | if eidx != he_ab && eidx != he_ba { [INFO] [stdout] 644 | | return Err("flip_edge: duplicate edge (d,c)"); [INFO] [stdout] 645 | | } [INFO] [stdout] 646 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 642 ~ if let Some(&eidx) = self.edge_map.get(&(d, c)) [INFO] [stdout] 643 ~ && eidx != he_ab && eidx != he_ba { [INFO] [stdout] 644 | return Err("flip_edge: duplicate edge (d,c)"); [INFO] [stdout] 645 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/point.rs:113:6 [INFO] [stdout] | [INFO] [stdout] 113 | impl<'a, 'b, T, const N: usize> Add<&'b Point> for &'a Point [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 113 - impl<'a, 'b, T, const N: usize> Add<&'b Point> for &'a Point [INFO] [stdout] 113 + impl<'b, T, const N: usize> Add<&'b Point> for &Point [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/point.rs:139:6 [INFO] [stdout] | [INFO] [stdout] 139 | impl<'a, 'b, T, const N: usize> Sub<&'b Point> for &'a Point [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 139 - impl<'a, 'b, T, const N: usize> Sub<&'b Point> for &'a Point [INFO] [stdout] 139 + impl<'b, T, const N: usize> Sub<&'b Point> for &Point [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/mesh/core.rs:787:25 [INFO] [stdout] | [INFO] [stdout] 787 | let he_cw = base_he_idx + 0; // c -> w (face 2 later) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider reducing it to: `base_he_idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/geometry/point.rs:336:1 [INFO] [stdout] | [INFO] [stdout] 336 | impl Into<[T; N]> for Point { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 336 ~ impl From> for [T; N] { [INFO] [stdout] 337 ~ fn from(val: Point) -> Self { [INFO] [stdout] 338 ~ val.coords [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/geometry/segment.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | / pub fn default() -> Self { [INFO] [stdout] 72 | | Self { [INFO] [stdout] 73 | | a: Point::default(), [INFO] [stdout] 74 | | b: Point::default(), [INFO] [stdout] 75 | | } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/mesh/core.rs:948:9 [INFO] [stdout] | [INFO] [stdout] 948 | for (from, to) in evs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, (from, to)) in evs.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `existing_evs` [INFO] [stdout] --> src/mesh/core.rs:957:18 [INFO] [stdout] | [INFO] [stdout] 957 | for i in 0..4 { [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] 957 - for i in 0..4 { [INFO] [stdout] 957 + for (i, ) in existing_evs.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/segment.rs:126:24 [INFO] [stdout] | [INFO] [stdout] 126 | if (&t - &prev_t).abs() > T::from(EPS) { [INFO] [stdout] | ^^^^^^-------^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `prev_t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/segment.rs:126:30 [INFO] [stdout] | [INFO] [stdout] 126 | if (&t - &prev_t).abs() > T::from(EPS) { [INFO] [stdout] | ^^^^^^^ help: change this to: `prev_t` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `twins` [INFO] [stdout] --> src/mesh/core.rs:978:18 [INFO] [stdout] | [INFO] [stdout] 978 | for i in 0..4 { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 978 - for i in 0..4 { [INFO] [stdout] 978 + for in &mut twins { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:31 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:60 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:70:65 [INFO] [stdout] | [INFO] [stdout] 70 | let u = &(&(&(y1 - y2) * &(x - &x2)) + &(&(x2 - x1) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:31 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:36 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `x2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:60 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^^^---^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:71:65 [INFO] [stdout] | [INFO] [stdout] 71 | let v = &(&(&(y2 - y0) * &(x - &x2)) + &(&(x0 - x2) * &(y - &y2))) / &denom; [INFO] [stdout] | ^^^ help: change this to: `y2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/core.rs:1092:55 [INFO] [stdout] | [INFO] [stdout] 1092 | return self.split_edge(aabb_tree, he, &p, update_tree); [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/core.rs:1137:57 [INFO] [stdout] | [INFO] [stdout] 1137 | for (_i, &(_from, to)) in edge_vertices_1.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1137 - for (_i, &(_from, to)) in edge_vertices_1.iter().enumerate() { [INFO] [stdout] 1137 + for &(_from, to) in edge_vertices_1.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/core.rs:1161:57 [INFO] [stdout] | [INFO] [stdout] 1161 | for (_i, &(_from, to)) in edge_vertices_2.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1161 - for (_i, &(_from, to)) in edge_vertices_2.iter().enumerate() { [INFO] [stdout] 1161 + for &(_from, to) in edge_vertices_2.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/core.rs:1185:57 [INFO] [stdout] | [INFO] [stdout] 1185 | for (_i, &(_from, to)) in edge_vertices_3.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1185 - for (_i, &(_from, to)) in edge_vertices_3.iter().enumerate() { [INFO] [stdout] 1185 + for &(_from, to) in edge_vertices_3.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:177:20 [INFO] [stdout] | [INFO] [stdout] 177 | let t1 = [to2d(&p[2]), to2d(&p[0]), to2d(&p[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `p[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:177:33 [INFO] [stdout] | [INFO] [stdout] 177 | let t1 = [to2d(&p[2]), to2d(&p[0]), to2d(&p[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `p[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:177:46 [INFO] [stdout] | [INFO] [stdout] 177 | let t1 = [to2d(&p[2]), to2d(&p[0]), to2d(&p[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `p[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:178:20 [INFO] [stdout] | [INFO] [stdout] 178 | let t2 = [to2d(&q[2]), to2d(&q[0]), to2d(&q[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `q[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:178:33 [INFO] [stdout] | [INFO] [stdout] 178 | let t2 = [to2d(&q[2]), to2d(&q[0]), to2d(&q[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `q[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:178:46 [INFO] [stdout] | [INFO] [stdout] 178 | let t2 = [to2d(&q[2]), to2d(&q[0]), to2d(&q[1])]; [INFO] [stdout] | ^^^^^ help: change this to: `q[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:200:65 [INFO] [stdout] | [INFO] [stdout] 200 | pts.push(back_project_to_3d(&s.a, i0, i1, drop, &p[2])); [INFO] [stdout] | ^^^^^ help: change this to: `p[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `convex_hull_2d_indices` doesn't need a mutable reference [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:227:51 [INFO] [stdout] | [INFO] [stdout] 227 | let hull_idx = convex_hull_2d_indices(&mut pts2d); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 227 - let hull_idx = convex_hull_2d_indices(&mut pts2d); [INFO] [stdout] 227 + let hull_idx = convex_hull_2d_indices(&pts2d); [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/geometry/tri_tri_intersect.rs:243:39 [INFO] [stdout] | [INFO] [stdout] 243 | pub fn convex_hull_2d_indices(pts: &Vec>) -> 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] 243 - pub fn convex_hull_2d_indices(pts: &Vec>) -> Vec [INFO] [stdout] 243 + pub fn convex_hull_2d_indices(pts: &[Point2]) -> Vec [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/core.rs:1422:28 [INFO] [stdout] | [INFO] [stdout] 1422 | let edge_vec = &new_pos - &b; [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/core.rs:1422:39 [INFO] [stdout] | [INFO] [stdout] 1422 | let edge_vec = &new_pos - &b; [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | return uniq.len(); [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] 448 - return uniq.len(); [INFO] [stdout] 448 + uniq.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mesh/edge_collapse.rs:662:13 [INFO] [stdout] | [INFO] [stdout] 662 | return self.collapse_edge_commit(plan).map_err(|_| CollapseReject::NotAdjacent); [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] 662 - return self.collapse_edge_commit(plan).map_err(|_| CollapseReject::NotAdjacent); [INFO] [stdout] 662 + self.collapse_edge_commit(plan).map_err(|_| CollapseReject::NotAdjacent) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mesh/edge_collapse.rs:665:13 [INFO] [stdout] | [INFO] [stdout] 665 | return Err(plan.err().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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 665 - return Err(plan.err().unwrap()); [INFO] [stdout] 665 + Err(plan.err().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/spatial_hash.rs:60:46 [INFO] [stdout] | [INFO] [stdout] 60 | let ax = if 0 < N { let a: CgarF64 = (&pos[0]).ref_into(); a.0 } else { 0.0 }; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pos[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/spatial_hash.rs:61:46 [INFO] [stdout] | [INFO] [stdout] 61 | let ay = if 1 < N { let a: CgarF64 = (&pos[1]).ref_into(); a.0 } else { 0.0 }; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pos[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/spatial_hash.rs:62:46 [INFO] [stdout] | [INFO] [stdout] 62 | let az = if 2 < N { let a: CgarF64 = (&pos[2]).ref_into(); a.0 } else { 0.0 }; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pos[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mesh/topology.rs:269:16 [INFO] [stdout] | [INFO] [stdout] 269 | if !(neg && pos) && !(z0 || z1 || z2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(z0 || z1 || z2 || neg && pos)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1369:58 [INFO] [stdout] | [INFO] [stdout] 1369 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1370:58 [INFO] [stdout] | [INFO] [stdout] 1370 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1371:58 [INFO] [stdout] | [INFO] [stdout] 1371 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1372:58 [INFO] [stdout] | [INFO] [stdout] 1372 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1407:62 [INFO] [stdout] | [INFO] [stdout] 1407 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/mesh/topology.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 305 | / let sum = (self.vertices[vs[0]].position[i].ball_center_f64() + [INFO] [stdout] 306 | | self.vertices[vs[1]].position[i].ball_center_f64() + [INFO] [stdout] 307 | | self.vertices[vs[2]].position[i].ball_center_f64()) / 3.0; [INFO] [stdout] | |______________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 308 | sum [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 305 ~ [INFO] [stdout] 306 ~ (self.vertices[vs[0]].position[i].ball_center_f64() + [INFO] [stdout] 307 + self.vertices[vs[1]].position[i].ball_center_f64() + [INFO] [stdout] 308 + self.vertices[vs[2]].position[i].ball_center_f64()) / 3.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1408:62 [INFO] [stdout] | [INFO] [stdout] 1408 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1409:62 [INFO] [stdout] | [INFO] [stdout] 1409 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1410:62 [INFO] [stdout] | [INFO] [stdout] 1410 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1431:66 [INFO] [stdout] | [INFO] [stdout] 1431 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1432:66 [INFO] [stdout] | [INFO] [stdout] 1432 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1433:66 [INFO] [stdout] | [INFO] [stdout] 1433 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1434:66 [INFO] [stdout] | [INFO] [stdout] 1434 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1482:23 [INFO] [stdout] | [INFO] [stdout] 1482 | } else if (&(&t - &T::one())).is_zero() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `(&t - &T::one())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1492:56 [INFO] [stdout] | [INFO] [stdout] 1492 | let on_q = classify_on_tri::(&ip, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1528:58 [INFO] [stdout] | [INFO] [stdout] 1528 | let on_p_a = classify_on_tri::(&a3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1529:58 [INFO] [stdout] | [INFO] [stdout] 1529 | let on_p_b = classify_on_tri::(&b3, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1530:58 [INFO] [stdout] | [INFO] [stdout] 1530 | let on_q_a = classify_on_tri::(&a3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1531:58 [INFO] [stdout] | [INFO] [stdout] 1531 | let on_q_b = classify_on_tri::(&b3, q, &pre_q); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_q` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1576:27 [INFO] [stdout] | [INFO] [stdout] 1576 | } else if (&(&u - &T::one())).is_zero() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `(&u - &T::one())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/tri_tri_intersect.rs:1586:60 [INFO] [stdout] | [INFO] [stdout] 1586 | let on_p = classify_on_tri::(&iq, p, &pre_p); [INFO] [stdout] | ^^^^^^ help: change this to: `pre_p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:452:13 [INFO] [stdout] | [INFO] [stdout] 452 | / if let Some(f) = fopt { [INFO] [stdout] 453 | | if !self.faces[f].removed { faces.insert(f); } [INFO] [stdout] 454 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 452 ~ if let Some(f) = fopt [INFO] [stdout] 453 ~ && !self.faces[f].removed { faces.insert(f); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:609:13 [INFO] [stdout] | [INFO] [stdout] 609 | / if N == 3 { [INFO] [stdout] 610 | | if let Some((t, u, v)) = ray_triangle_intersection(p, dir, std::array::from_fn(|i| vs[i]), tolerance) { [INFO] [stdout] 611 | | if t.is_negative() { [INFO] [stdout] 612 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 672 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 609 ~ if N == 3 [INFO] [stdout] 610 ~ && let Some((t, u, v)) = ray_triangle_intersection(p, dir, std::array::from_fn(|i| vs[i]), tolerance) { [INFO] [stdout] 611 | if t.is_negative() { [INFO] [stdout] ... [INFO] [stdout] 670 | } [INFO] [stdout] 671 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/util.rs:251:14 [INFO] [stdout] | [INFO] [stdout] 251 | let v2 = &proj - &a; [INFO] [stdout] | ^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:251:22 [INFO] [stdout] | [INFO] [stdout] 251 | let v2 = &proj - &a; [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:358:20 [INFO] [stdout] | [INFO] [stdout] 358 | let dd = d.dot(&d); [INFO] [stdout] | ^^ help: change this to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/util.rs:359:8 [INFO] [stdout] | [INFO] [stdout] 359 | if &dd <= &eps { [INFO] [stdout] | ^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/mesh/topology.rs:874:17 [INFO] [stdout] | [INFO] [stdout] 874 | if self.half_edges[h0].face == Some(face) { h0 } else { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 873 ~ (Some(h0), None) [INFO] [stdout] 874 ~ if self.half_edges[h0].face == Some(face) => { h0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:359:15 [INFO] [stdout] | [INFO] [stdout] 359 | if &dd <= &eps { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/mesh/topology.rs:877:17 [INFO] [stdout] | [INFO] [stdout] 877 | if self.half_edges[h1].face == Some(face) { h1 } else { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 876 ~ (None, Some(h1)) [INFO] [stdout] 877 ~ if self.half_edges[h1].face == Some(face) => { h1 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:362:21 [INFO] [stdout] | [INFO] [stdout] 362 | d.scale(&(v.dot(&d) / dd)) [INFO] [stdout] | ^^ help: change this to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/util.rs:380:19 [INFO] [stdout] | [INFO] [stdout] 380 | a + &ab.scale(&u).0 [INFO] [stdout] | ^^ help: change this to: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/vector.rs:116:6 [INFO] [stdout] | [INFO] [stdout] 116 | impl<'a, 'b, T, const N: usize> Add<&'b Vector> for &'a Vector [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 116 - impl<'a, 'b, T, const N: usize> Add<&'b Vector> for &'a Vector [INFO] [stdout] 116 + impl<'b, T, const N: usize> Add<&'b Vector> for &Vector [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/geometry/vector.rs:142:6 [INFO] [stdout] | [INFO] [stdout] 142 | impl<'a, 'b, T, const N: usize> Sub<&'b Vector> for &'a Vector [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 142 - impl<'a, 'b, T, const N: usize> Sub<&'b Vector> for &'a Vector [INFO] [stdout] 142 + impl<'b, T, const N: usize> Sub<&'b Vector> for &Vector [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:187:46 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:187:57 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:187:61 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:187:72 [INFO] [stdout] | [INFO] [stdout] 187 | Self::from(Point::::from_vals([&self[0] * &s, &self[1] * &s])) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:234:13 [INFO] [stdout] | [INFO] [stdout] 234 | &self[0] * &s, [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:234:24 [INFO] [stdout] | [INFO] [stdout] 234 | &self[0] * &s, [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:235:13 [INFO] [stdout] | [INFO] [stdout] 235 | &self[1] * &s, [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:235:24 [INFO] [stdout] | [INFO] [stdout] 235 | &self[1] * &s, [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/geometry/vector.rs:236:13 [INFO] [stdout] | [INFO] [stdout] 236 | &self[2] * &s, [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/geometry/vector.rs:236:24 [INFO] [stdout] | [INFO] [stdout] 236 | &self[2] * &s, [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/geometry/vector.rs:298:1 [INFO] [stdout] | [INFO] [stdout] 298 | impl Into<[T; N]> for Vector { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 298 ~ impl From> for [T; N] { [INFO] [stdout] 299 ~ fn from(val: Vector) -> Self { [INFO] [stdout] 300 ~ val.0.coords [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh/topology.rs:1154:16 [INFO] [stdout] | [INFO] [stdout] 1154 | if &t_plane < &(-tol.clone()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 1154 - if &t_plane < &(-tol.clone()) { [INFO] [stdout] 1154 + if t_plane < (-tol.clone()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1201:13 [INFO] [stdout] | [INFO] [stdout] 1201 | / if let Some((t_hit, u_seg)) = [INFO] [stdout] 1202 | | ray_segment_intersection_2d_robust(&from2, &dir2, &a2, &b2, &tol) [INFO] [stdout] 1203 | | { [INFO] [stdout] 1204 | | if t_hit >= tol { [INFO] [stdout] ... | [INFO] [stdout] 1220 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1202 ~ ray_segment_intersection_2d_robust(&from2, &dir2, &a2, &b2, &tol) [INFO] [stdout] 1203 ~ && t_hit >= tol { [INFO] [stdout] 1204 | match &mut best { [INFO] [stdout] ... [INFO] [stdout] 1217 | } [INFO] [stdout] 1218 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/mesh/topology.rs:1208:48 [INFO] [stdout] | [INFO] [stdout] 1208 | ... if &t_hit < best_t { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 1209 | | ... *best_he = he_idx; [INFO] [stdout] 1210 | | ... *best_t = t_hit; [INFO] [stdout] 1211 | | ... *best_u = u_seg; [INFO] [stdout] 1212 | | ... } else if near_zero(&(&t_hit - best_t)) && he_idx < *best_he { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/mesh/topology.rs:1212:90 [INFO] [stdout] | [INFO] [stdout] 1212 | ... } else if near_zero(&(&t_hit - best_t)) && he_idx < *best_he { [INFO] [stdout] | ____________________________________________________________________________________^ [INFO] [stdout] 1213 | | ... *best_he = he_idx; [INFO] [stdout] 1214 | | ... *best_t = t_hit; [INFO] [stdout] 1215 | | ... *best_u = u_seg; [INFO] [stdout] 1216 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mesh/topology.rs:1323:9 [INFO] [stdout] | [INFO] [stdout] 1323 | return FindFaceResult::Inside { f, bary: (l0, l1, l2) }; [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] 1323 - return FindFaceResult::Inside { f, bary: (l0, l1, l2) }; [INFO] [stdout] 1323 + FindFaceResult::Inside { f, bary: (l0, l1, l2) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1305:9 [INFO] [stdout] | [INFO] [stdout] 1305 | / if zc == 1 { [INFO] [stdout] 1306 | | if let Some((he_guess, mut u_bary)) = self.edge_and_u_from_bary_zero(f, &l0, &l1, &l2) { [INFO] [stdout] 1307 | | if u_bary.is_negative() { u_bary = zero.clone(); } [INFO] [stdout] 1308 | | if (&u_bary - &one).is_positive() { u_bary = one.clone(); } [INFO] [stdout] ... | [INFO] [stdout] 1311 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1305 ~ if zc == 1 [INFO] [stdout] 1306 ~ && let Some((he_guess, mut u_bary)) = self.edge_and_u_from_bary_zero(f, &l0, &l1, &l2) { [INFO] [stdout] 1307 | if u_bary.is_negative() { u_bary = zero.clone(); } [INFO] [stdout] 1308 | if (&u_bary - &one).is_positive() { u_bary = one.clone(); } [INFO] [stdout] 1309 | return FindFaceResult::OnEdge { f, he: he_guess, u: u_bary }; [INFO] [stdout] 1310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1399:17 [INFO] [stdout] | [INFO] [stdout] 1399 | / if let Some(fnbr) = mesh.half_edges[tw].face { [INFO] [stdout] 1400 | | if !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1401 | | q.push_back(fnbr); [INFO] [stdout] 1402 | | } [INFO] [stdout] 1403 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1399 ~ if let Some(fnbr) = mesh.half_edges[tw].face [INFO] [stdout] 1400 ~ && !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1401 | q.push_back(fnbr); [INFO] [stdout] 1402 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1607:17 [INFO] [stdout] | [INFO] [stdout] 1607 | / if let Some(fnbr) = mesh.half_edges[tw].face { [INFO] [stdout] 1608 | | if !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1609 | | q.push_back(fnbr); [INFO] [stdout] 1610 | | } [INFO] [stdout] 1611 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1607 ~ if let Some(fnbr) = mesh.half_edges[tw].face [INFO] [stdout] 1608 ~ && !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1609 | q.push_back(fnbr); [INFO] [stdout] 1610 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/kernel/mod.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | pub mod kernel; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/kernel/predicates.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return true; [INFO] [stdout] 52 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1808:17 [INFO] [stdout] | [INFO] [stdout] 1808 | / if let Some(fnbr) = mesh.half_edges[tw].face { [INFO] [stdout] 1809 | | if !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1810 | | q.push_back(fnbr); [INFO] [stdout] 1811 | | } [INFO] [stdout] 1812 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1808 ~ if let Some(fnbr) = mesh.half_edges[tw].face [INFO] [stdout] 1809 ~ && !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1810 | q.push_back(fnbr); [INFO] [stdout] 1811 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/kernel/predicates.rs:435:9 [INFO] [stdout] | [INFO] [stdout] 435 | return classify_from_edges(&e0, &e1, &e2); [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] 435 - return classify_from_edges(&e0, &e1, &e2); [INFO] [stdout] 435 + classify_from_edges(&e0, &e1, &e2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/kernel/predicates.rs:465:9 [INFO] [stdout] | [INFO] [stdout] 465 | return classify_from_edges(&e0, &e1, &e2); [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] 465 - return classify_from_edges(&e0, &e1, &e2); [INFO] [stdout] 465 + classify_from_edges(&e0, &e1, &e2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/topology.rs:1968:22 [INFO] [stdout] | [INFO] [stdout] 1968 | let d2 = (&(point - &closest).as_vector()).norm2(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(point - &closest).as_vector()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mesh/topology.rs:2108:9 [INFO] [stdout] | [INFO] [stdout] 2108 | / return self.edge_map.contains_key(&(vertex_a, vertex_b)) [INFO] [stdout] 2109 | | || self.edge_map.contains_key(&(vertex_b, vertex_a)); [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] 2108 ~ self.edge_map.contains_key(&(vertex_a, vertex_b)) [INFO] [stdout] 2109 ~ || self.edge_map.contains_key(&(vertex_b, vertex_a)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:554:12 [INFO] [stdout] | [INFO] [stdout] 554 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:557:12 [INFO] [stdout] | [INFO] [stdout] 557 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:557:21 [INFO] [stdout] | [INFO] [stdout] 557 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:560:12 [INFO] [stdout] | [INFO] [stdout] 560 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:560:21 [INFO] [stdout] | [INFO] [stdout] 560 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^ help: change this to: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:599:33 [INFO] [stdout] | [INFO] [stdout] 599 | Point2::::from_vals([minx.clone(), miny.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:599:47 [INFO] [stdout] | [INFO] [stdout] 599 | Point2::::from_vals([minx.clone(), miny.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `miny` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:600:33 [INFO] [stdout] | [INFO] [stdout] 600 | Point2::::from_vals([maxx.clone(), maxy.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxx` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:600:47 [INFO] [stdout] | [INFO] [stdout] 600 | Point2::::from_vals([maxx.clone(), maxy.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxy` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/topology.rs:2177:47 [INFO] [stdout] | [INFO] [stdout] 2177 | for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 2177 - for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] 2177 + for he in self.half_edges.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:620:12 [INFO] [stdout] | [INFO] [stdout] 620 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:620:21 [INFO] [stdout] | [INFO] [stdout] 620 | if (&p[0] - &minx).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `minx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:623:12 [INFO] [stdout] | [INFO] [stdout] 623 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:623:21 [INFO] [stdout] | [INFO] [stdout] 623 | if (&p[1] - &miny).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `miny` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:626:12 [INFO] [stdout] | [INFO] [stdout] 626 | if (&p[2] - &minz).is_negative() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `minz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:626:21 [INFO] [stdout] | [INFO] [stdout] 626 | if (&p[2] - &minz).is_negative() { [INFO] [stdout] | ^^^^^ help: change this to: `minz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:629:12 [INFO] [stdout] | [INFO] [stdout] 629 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:629:21 [INFO] [stdout] | [INFO] [stdout] 629 | if (&p[0] - &maxx).is_positive() { [INFO] [stdout] | ^^^^^ help: change this to: `maxx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/kernel/predicates.rs:635:12 [INFO] [stdout] | [INFO] [stdout] 635 | if (&p[2] - &maxz).is_positive() { [INFO] [stdout] | ^^^^^^^^^-----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `maxz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/kernel/predicates.rs:635:21 [INFO] [stdout] | [INFO] [stdout] 635 | if (&p[2] - &maxz).is_positive() { [INFO] [stdout] | ^^^^^ help: change this to: `maxz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/topology.rs:2232:47 [INFO] [stdout] | [INFO] [stdout] 2232 | for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 2232 - for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] 2232 + for he in self.half_edges.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:679:33 [INFO] [stdout] | [INFO] [stdout] 679 | Point3::::from_vals([minx.clone(), miny.clone(), minz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `minx` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:679:47 [INFO] [stdout] | [INFO] [stdout] 679 | Point3::::from_vals([minx.clone(), miny.clone(), minz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `miny` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:679:61 [INFO] [stdout] | [INFO] [stdout] 679 | Point3::::from_vals([minx.clone(), miny.clone(), minz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `minz` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:680:33 [INFO] [stdout] | [INFO] [stdout] 680 | Point3::::from_vals([maxx.clone(), maxy.clone(), maxz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxx` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:680:47 [INFO] [stdout] | [INFO] [stdout] 680 | Point3::::from_vals([maxx.clone(), maxy.clone(), maxz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxy` [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 `f64` which implements the `Copy` trait [INFO] [stdout] --> src/kernel/predicates.rs:680:61 [INFO] [stdout] | [INFO] [stdout] 680 | Point3::::from_vals([maxx.clone(), maxy.clone(), maxz.clone()]), [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `maxz` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2679:25 [INFO] [stdout] | [INFO] [stdout] 2679 | let u_num = w.cross(&r); [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2683:23 [INFO] [stdout] | [INFO] [stdout] 2683 | x >= &meps && x <= &eps [INFO] [stdout] | ^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2683:28 [INFO] [stdout] | [INFO] [stdout] 2683 | x >= &meps && x <= &eps [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2693:12 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2693:18 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2693:26 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2693:31 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh/topology.rs:2693:39 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2693 - if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] 2693 + if &t >= &eps && &u > &eps && u <= (&T::one() + &eps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2693:46 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2693:59 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2724:8 [INFO] [stdout] | [INFO] [stdout] 2724 | if &t_exit < &eps { [INFO] [stdout] | ^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2724:18 [INFO] [stdout] | [INFO] [stdout] 2724 | if &t_exit < &eps { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2729:20 [INFO] [stdout] | [INFO] [stdout] 2729 | let t_hit = if &t_enter >= &eps { t_enter } else { t_exit }; [INFO] [stdout] | ^^^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2729:32 [INFO] [stdout] | [INFO] [stdout] 2729 | let t_hit = if &t_enter >= &eps { t_enter } else { t_exit }; [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2742:8 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2742:18 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2742:26 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2742:31 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh/topology.rs:2742:39 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2742 - if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] 2742 + if &t_hit >= &eps && &u > &eps && u <= (&T::one() + &eps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2742:46 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2742:59 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `crate::mesh::basic_types::Mesh` [INFO] [stdout] --> src/mesh/core.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / pub fn new() -> Self { [INFO] [stdout] 45 | | let s = Self { [INFO] [stdout] 46 | | vertices: Vec::new(), [INFO] [stdout] 47 | | half_edges: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 57 | | s.with_default_hash() [INFO] [stdout] 58 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] --> src/mesh/mod.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 ~ impl Default for crate::mesh::basic_types::Mesh [INFO] [stdout] 38 + where [INFO] [stdout] 39 + crate::geometry::point::Point: crate::geometry::point::PointOps>, [INFO] [stdout] 40 + crate::geometry::vector::Vector: crate::geometry::vector::VectorOps, [INFO] [stdout] 41 + for<'a> &'a T: std::ops::Sub<&'a T, Output = T> [INFO] [stdout] 42 + + std::ops::Mul<&'a T, Output = T> [INFO] [stdout] 43 + + std::ops::Add<&'a T, Output = T> [INFO] [stdout] 44 + + std::ops::Div<&'a T, Output = T> [INFO] [stdout] 45 + + std::ops::Neg, [INFO] [stdout] 46 + { [INFO] [stdout] 47 + fn default() -> Self { [INFO] [stdout] 48 + Self::new() [INFO] [stdout] 49 + } [INFO] [stdout] 50 + } [INFO] [stdout] 51 + [INFO] [stdout] 52 ~ impl crate::mesh::basic_types::Mesh [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/mesh/core.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | .expect(&format!( [INFO] [stdout] | __________________^ [INFO] [stdout] 81 | | "Edge map must contain the segment vertices pair. Segment {}\n{:?}", [INFO] [stdout] 82 | | seg_idx, seg [INFO] [stdout] 83 | | )); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ .unwrap_or_else(|| panic!("Edge map must contain the segment vertices pair. Segment {}\n{:?}", [INFO] [stdout] 81 ~ seg_idx, seg)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/mesh/core.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | / let mut borders: Vec = Vec::new(); [INFO] [stdout] 108 | | borders.reserve(m); [INFO] [stdout] | |___________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut borders: Vec = Vec::with_capacity(m);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(&owner) = self.edge_map.get(&(u, v)) { [INFO] [stdout] 88 | | if owner == h { self.edge_map.remove(&(u, v)); } [INFO] [stdout] 89 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(&owner) = self.edge_map.get(&(u, v)) [INFO] [stdout] 88 ~ && owner == h { self.edge_map.remove(&(u, v)); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:204:25 [INFO] [stdout] | [INFO] [stdout] 204 | / if twin_idx != usize::MAX && twin_idx < self.half_edges.len() { [INFO] [stdout] 205 | | if let Some(twin_face) = self.half_edges[twin_idx].face { [INFO] [stdout] 206 | | if twin_face != face_idx [INFO] [stdout] 207 | | && twin_face < self.faces.len() [INFO] [stdout] ... | [INFO] [stdout] 213 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 204 ~ if twin_idx != usize::MAX && twin_idx < self.half_edges.len() [INFO] [stdout] 205 ~ && let Some(twin_face) = self.half_edges[twin_idx].face { [INFO] [stdout] 206 | if twin_face != face_idx [INFO] [stdout] ... [INFO] [stdout] 211 | } [INFO] [stdout] 212 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:205:29 [INFO] [stdout] | [INFO] [stdout] 205 | / ... if let Some(twin_face) = self.half_edges[twin_idx].face { [INFO] [stdout] 206 | | ... if twin_face != face_idx [INFO] [stdout] 207 | | ... && twin_face < self.faces.len() [INFO] [stdout] 208 | | ... && self.faces[twin_face].half_edge != usize::MAX [INFO] [stdout] ... | [INFO] [stdout] 212 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 205 ~ if let Some(twin_face) = self.half_edges[twin_idx].face [INFO] [stdout] 206 ~ && twin_face != face_idx [INFO] [stdout] 207 | && twin_face < self.faces.len() [INFO] [stdout] ... [INFO] [stdout] 210 | adjacent_faces.push(twin_face); [INFO] [stdout] 211 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | / if m.half_edges[h].vertex == v || m.half_edges[m.half_edges[h].twin].vertex == v { [INFO] [stdout] 140 | | if let Some(hh) = normalize_to_outgoing(m,h,v) { return Some(hh); } [INFO] [stdout] 141 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 139 ~ if (m.half_edges[h].vertex == v || m.half_edges[m.half_edges[h].twin].vertex == v) { [INFO] [stdout] 140 ~ && let Some(hh) = normalize_to_outgoing(m,h,v) { return Some(hh); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:333:13 [INFO] [stdout] | [INFO] [stdout] 333 | / if old_vertex < old_to_new.len() { [INFO] [stdout] 334 | | if let Some(&new_vertex) = old_to_new.get(old_vertex) { [INFO] [stdout] 335 | | if new_vertex != usize::MAX { [INFO] [stdout] 336 | | half_edge.vertex = new_vertex; [INFO] [stdout] ... | [INFO] [stdout] 339 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 333 ~ if old_vertex < old_to_new.len() [INFO] [stdout] 334 ~ && let Some(&new_vertex) = old_to_new.get(old_vertex) { [INFO] [stdout] 335 | if new_vertex != usize::MAX { [INFO] [stdout] 336 | half_edge.vertex = new_vertex; [INFO] [stdout] 337 | } [INFO] [stdout] 338 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | / if let Some(&new_vertex) = old_to_new.get(old_vertex) { [INFO] [stdout] 335 | | if new_vertex != usize::MAX { [INFO] [stdout] 336 | | half_edge.vertex = new_vertex; [INFO] [stdout] 337 | | } [INFO] [stdout] 338 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 334 ~ if let Some(&new_vertex) = old_to_new.get(old_vertex) [INFO] [stdout] 335 ~ && new_vertex != usize::MAX { [INFO] [stdout] 336 | half_edge.vertex = new_vertex; [INFO] [stdout] 337 ~ } [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/mesh/triangle.rs:296:45 [INFO] [stdout] | [INFO] [stdout] 296 | &mut self, start_b: usize, visited: &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] 296 - &mut self, start_b: usize, visited: &mut Vec [INFO] [stdout] 296 + &mut self, start_b: usize, visited: &mut [bool] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mesh/core.rs:438:50 [INFO] [stdout] | [INFO] [stdout] 438 | pub fn build_face_tree_with_lookup(&self) -> (AabbTree, usize>, Vec>>) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | / if let Some(&owner) = m.edge_map.get(&(u, v)) { [INFO] [stdout] 365 | | if owner == h { [INFO] [stdout] 366 | | m.edge_map.remove(&(u, v)); [INFO] [stdout] 367 | | } [INFO] [stdout] 368 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 364 ~ if let Some(&owner) = m.edge_map.get(&(u, v)) [INFO] [stdout] 365 ~ && owner == h { [INFO] [stdout] 366 | m.edge_map.remove(&(u, v)); [INFO] [stdout] 367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:372:13 [INFO] [stdout] | [INFO] [stdout] 372 | / if let Some(&owner) = m.edge_map.get(&(u, v)) { [INFO] [stdout] 373 | | if owner == h { [INFO] [stdout] 374 | | m.edge_map.remove(&(u, v)); [INFO] [stdout] 375 | | } [INFO] [stdout] 376 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 372 ~ if let Some(&owner) = m.edge_map.get(&(u, v)) [INFO] [stdout] 373 ~ && owner == h { [INFO] [stdout] 374 | m.edge_map.remove(&(u, v)); [INFO] [stdout] 375 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `new_borders` [INFO] [stdout] --> src/mesh/triangle.rs:474:22 [INFO] [stdout] | [INFO] [stdout] 474 | for i in 0..nb_count { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 474 - for i in 0..nb_count { [INFO] [stdout] 474 + for in new_borders.iter().take(nb_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/mesh/triangle.rs:548:13 [INFO] [stdout] | [INFO] [stdout] 548 | / for h in 0..m.half_edges.len() { [INFO] [stdout] 549 | | if is_outgoing_from(m, h, v) { [INFO] [stdout] 550 | | return Some(h); [INFO] [stdout] ... | [INFO] [stdout] 553 | | None [INFO] [stdout] | |________________^ help: replace with an iterator: `(0..m.half_edges.len()).find(|&h| is_outgoing_from(m, h, v))` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `new_borders` [INFO] [stdout] --> src/mesh/triangle.rs:565:18 [INFO] [stdout] | [INFO] [stdout] 565 | for i in 0..nb_count { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 565 - for i in 0..nb_count { [INFO] [stdout] 565 + for in new_borders.iter().take(nb_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | / if let Some(&eidx) = self.edge_map.get(&(c, d)) { [INFO] [stdout] 638 | | if eidx != he_ab && eidx != he_ba { [INFO] [stdout] 639 | | return Err("flip_edge: duplicate edge (c,d)"); [INFO] [stdout] 640 | | } [INFO] [stdout] 641 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 637 ~ if let Some(&eidx) = self.edge_map.get(&(c, d)) [INFO] [stdout] 638 ~ && eidx != he_ab && eidx != he_ba { [INFO] [stdout] 639 | return Err("flip_edge: duplicate edge (c,d)"); [INFO] [stdout] 640 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/core.rs:642:9 [INFO] [stdout] | [INFO] [stdout] 642 | / if let Some(&eidx) = self.edge_map.get(&(d, c)) { [INFO] [stdout] 643 | | if eidx != he_ab && eidx != he_ba { [INFO] [stdout] 644 | | return Err("flip_edge: duplicate edge (d,c)"); [INFO] [stdout] 645 | | } [INFO] [stdout] 646 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 642 ~ if let Some(&eidx) = self.edge_map.get(&(d, c)) [INFO] [stdout] 643 ~ && eidx != he_ab && eidx != he_ba { [INFO] [stdout] 644 | return Err("flip_edge: duplicate edge (d,c)"); [INFO] [stdout] 645 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/mesh/core.rs:787:25 [INFO] [stdout] | [INFO] [stdout] 787 | let he_cw = base_he_idx + 0; // c -> w (face 2 later) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider reducing it to: `base_he_idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:786:13 [INFO] [stdout] | [INFO] [stdout] 786 | / if b != usize::MAX && b < self.half_edges.len() { [INFO] [stdout] 787 | | if !self.half_edges[b].removed && self.half_edges[b].face.is_none() { [INFO] [stdout] 788 | | debug_assert!( [INFO] [stdout] 789 | | self.half_edges[b].next != b && self.half_edges[b].prev != b, [INFO] [stdout] ... | [INFO] [stdout] 794 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 786 ~ if b != usize::MAX && b < self.half_edges.len() [INFO] [stdout] 787 ~ && !self.half_edges[b].removed && self.half_edges[b].face.is_none() { [INFO] [stdout] 788 | debug_assert!( [INFO] [stdout] ... [INFO] [stdout] 792 | ); [INFO] [stdout] 793 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/mesh/core.rs:948:9 [INFO] [stdout] | [INFO] [stdout] 948 | for (from, to) in evs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, (from, to)) in evs.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `existing_evs` [INFO] [stdout] --> src/mesh/core.rs:957:18 [INFO] [stdout] | [INFO] [stdout] 957 | for i in 0..4 { [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] 957 - for i in 0..4 { [INFO] [stdout] 957 + for (i, ) in existing_evs.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `twins` [INFO] [stdout] --> src/mesh/core.rs:978:18 [INFO] [stdout] | [INFO] [stdout] 978 | for i in 0..4 { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 978 - for i in 0..4 { [INFO] [stdout] 978 + for in &mut twins { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/core.rs:1092:55 [INFO] [stdout] | [INFO] [stdout] 1092 | return self.split_edge(aabb_tree, he, &p, update_tree); [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `he_opt` after checking its variant with `is_some` [INFO] [stdout] --> src/mesh_processing/batching.rs:168:26 [INFO] [stdout] | [INFO] [stdout] 167 | if endpoint_flag == 1 && he_opt.is_some() { [INFO] [stdout] | ---------------- the check is happening here [INFO] [stdout] 168 | let he = he_opt.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/mesh_processing/batching.rs:88:28 [INFO] [stdout] | [INFO] [stdout] 88 | intersection_segments: &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] 88 - intersection_segments: &mut Vec>, [INFO] [stdout] 88 + intersection_segments: &mut [IntersectionSegment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mesh_processing/batching.rs:102:24 [INFO] [stdout] | [INFO] [stdout] 102 | let mut keyed_map: AHashMap<(ApproxPointKey, (usize, usize), [usize; 2], u8), usize> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/core.rs:1137:57 [INFO] [stdout] | [INFO] [stdout] 1137 | for (_i, &(_from, to)) in edge_vertices_1.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1137 - for (_i, &(_from, to)) in edge_vertices_1.iter().enumerate() { [INFO] [stdout] 1137 + for &(_from, to) in edge_vertices_1.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:119:39 [INFO] [stdout] | [INFO] [stdout] 119 | let canonical = point_key(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/core.rs:1161:57 [INFO] [stdout] | [INFO] [stdout] 1161 | for (_i, &(_from, to)) in edge_vertices_2.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1161 - for (_i, &(_from, to)) in edge_vertices_2.iter().enumerate() { [INFO] [stdout] 1161 + for &(_from, to) in edge_vertices_2.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | / if let Some(hint) = ep.vertex_hint { [INFO] [stdout] 148 | | if hint[0] != usize::MAX [INFO] [stdout] 149 | | && (edge_key == (usize::MAX, usize::MAX) || endpoint_flag == 1) [INFO] [stdout] ... | [INFO] [stdout] 159 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 147 ~ if let Some(hint) = ep.vertex_hint [INFO] [stdout] 148 ~ && hint[0] != usize::MAX [INFO] [stdout] 149 | && (edge_key == (usize::MAX, usize::MAX) || endpoint_flag == 1) [INFO] [stdout] ... [INFO] [stdout] 157 | continue; [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/core.rs:1185:57 [INFO] [stdout] | [INFO] [stdout] 1185 | for (_i, &(_from, to)) in edge_vertices_3.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1185 - for (_i, &(_from, to)) in edge_vertices_3.iter().enumerate() { [INFO] [stdout] 1185 + for &(_from, to) in edge_vertices_3.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | / if let (Some(he), Some(u_raw)) = (he_opt, u_opt_f64) { [INFO] [stdout] 189 | | if endpoint_flag == 0 { [INFO] [stdout] 190 | | if let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] 191 | | let u_can = canonicalize_u_for_edge(mesh, he, ek, u_raw); [INFO] [stdout] ... | [INFO] [stdout] 207 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 188 ~ if let (Some(he), Some(u_raw)) = (he_opt, u_opt_f64) [INFO] [stdout] 189 ~ && endpoint_flag == 0 { [INFO] [stdout] 190 | if let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] ... [INFO] [stdout] 205 | } [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | / if endpoint_flag == 0 { [INFO] [stdout] 190 | | if let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] 191 | | let u_can = canonicalize_u_for_edge(mesh, he, ek, u_raw); [INFO] [stdout] 192 | | let ub = bucket_u(u_can, tol_f64); [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 189 ~ if endpoint_flag == 0 [INFO] [stdout] 190 ~ && let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] 191 | let u_can = canonicalize_u_for_edge(mesh, he, ek, u_raw); [INFO] [stdout] ... [INFO] [stdout] 204 | continue; [INFO] [stdout] 205 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:197:77 [INFO] [stdout] | [INFO] [stdout] 197 | ... let (vid, _existed) = mesh.get_or_insert_vertex(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:216:57 [INFO] [stdout] | [INFO] [stdout] 216 | let new_vid = mesh.get_or_insert_vertex(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:234:53 [INFO] [stdout] | [INFO] [stdout] 234 | let new_vid = mesh.get_or_insert_vertex(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:251:39 [INFO] [stdout] | [INFO] [stdout] 251 | let canonical = point_key(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:286:47 [INFO] [stdout] | [INFO] [stdout] 286 | mesh.get_or_insert_vertex(&ep_pos).0 [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/core.rs:1422:28 [INFO] [stdout] | [INFO] [stdout] 1422 | let edge_vec = &new_pos - &b; [INFO] [stdout] | ^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/core.rs:1422:39 [INFO] [stdout] | [INFO] [stdout] 1422 | let edge_vec = &new_pos - &b; [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/mesh_processing/batching.rs:410:1 [INFO] [stdout] | [INFO] [stdout] 410 | / fn push_vertex_uv( [INFO] [stdout] 411 | | mesh: &Mesh, [INFO] [stdout] 412 | | g2l: &mut AHashMap, [INFO] [stdout] 413 | | verts_global: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 425 | | + std::ops::Mul<&'x T, Output = T> [INFO] [stdout] 426 | | + std::ops::Div<&'x T, Output = T>, [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: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:622:13 [INFO] [stdout] | [INFO] [stdout] 622 | / if va != usize::MAX && vb != usize::MAX { [INFO] [stdout] 623 | | if let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) { [INFO] [stdout] 624 | | if la != lb { [INFO] [stdout] 625 | | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] ... | [INFO] [stdout] 628 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 622 ~ if va != usize::MAX && vb != usize::MAX [INFO] [stdout] 623 ~ && let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) { [INFO] [stdout] 624 | if la != lb { [INFO] [stdout] 625 | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] 626 | } [INFO] [stdout] 627 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:623:17 [INFO] [stdout] | [INFO] [stdout] 623 | / if let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) { [INFO] [stdout] 624 | | if la != lb { [INFO] [stdout] 625 | | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] 626 | | } [INFO] [stdout] 627 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 623 ~ if let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) [INFO] [stdout] 624 ~ && la != lb { [INFO] [stdout] 625 | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/mesh_processing/batching.rs:882:6 [INFO] [stdout] | [INFO] [stdout] 882 | (t >= -EPS && t <= 1.0 + EPS, t) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-EPS..=1.0 + EPS).contains(&t)` [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: this `map_or` can be simplified [INFO] [stdout] --> src/mesh_processing/batching.rs:922:12 [INFO] [stdout] | [INFO] [stdout] 922 | if best.as_ref().map_or(true, |(_, bd2)| d2 < *bd2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 922 - if best.as_ref().map_or(true, |(_, bd2)| d2 < *bd2) { [INFO] [stdout] 922 + if best.as_ref().is_none_or(|(_, bd2)| d2 < *bd2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh_processing/boolean.rs:67:31 [INFO] [stdout] | [INFO] [stdout] 67 | let tol_approx: CgarF64 = (&tol).ref_into(); [INFO] [stdout] | ^^^^^^ help: change this to: `tol` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh_processing/boolean.rs:72:27 [INFO] [stdout] | [INFO] [stdout] 72 | let ai: CgarF64 = (&p[i]).ref_into(); [INFO] [stdout] | ^^^^^^^ help: change this to: `p[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `f` is used to index `inside` [INFO] [stdout] --> src/mesh_processing/boolean.rs:141:22 [INFO] [stdout] | [INFO] [stdout] 141 | for f in 0..self.faces.len() { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 141 - for f in 0..self.faces.len() { [INFO] [stdout] 141 + for (f, ) in inside.iter_mut().enumerate().take(self.faces.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mesh/edge_collapse.rs:662:13 [INFO] [stdout] | [INFO] [stdout] 662 | return self.collapse_edge_commit(plan).map_err(|_| CollapseReject::NotAdjacent); [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] 662 - return self.collapse_edge_commit(plan).map_err(|_| CollapseReject::NotAdjacent); [INFO] [stdout] 662 + self.collapse_edge_commit(plan).map_err(|_| CollapseReject::NotAdjacent) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mesh/edge_collapse.rs:665:13 [INFO] [stdout] | [INFO] [stdout] 665 | return Err(plan.err().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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 665 - return Err(plan.err().unwrap()); [INFO] [stdout] 665 + Err(plan.err().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:171:17 [INFO] [stdout] | [INFO] [stdout] 171 | &self, [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:172:17 [INFO] [stdout] | [INFO] [stdout] 172 | &other, [INFO] [stdout] | ^^^^^^ help: change this to: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `seg_idx` is only used to index `intersection_segments` [INFO] [stdout] --> src/mesh_processing/boolean.rs:180:28 [INFO] [stdout] | [INFO] [stdout] 180 | for seg_idx in 0..intersection_segments.len() { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 180 - for seg_idx in 0..intersection_segments.len() { [INFO] [stdout] 180 + for in &intersection_segments { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/boolean.rs:222:21 [INFO] [stdout] | [INFO] [stdout] 222 | / if let Some(pv) = paired { [INFO] [stdout] 223 | | if pv.iter().any(|&pf| pf == nbr) { [INFO] [stdout] 224 | | // this nbr is the other half of a segment splitting curr [INFO] [stdout] 225 | | continue; [INFO] [stdout] 226 | | } [INFO] [stdout] 227 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 222 ~ if let Some(pv) = paired [INFO] [stdout] 223 ~ && pv.iter().any(|&pf| pf == nbr) { [INFO] [stdout] 224 | // this nbr is the other half of a segment splitting curr [INFO] [stdout] 225 | continue; [INFO] [stdout] 226 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/mesh_processing/boolean.rs:223:28 [INFO] [stdout] | [INFO] [stdout] 223 | if pv.iter().any(|&pf| pf == nbr) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pv.contains(&nbr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/spatial_hash.rs:60:46 [INFO] [stdout] | [INFO] [stdout] 60 | let ax = if 0 < N { let a: CgarF64 = (&pos[0]).ref_into(); a.0 } else { 0.0 }; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pos[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/spatial_hash.rs:61:46 [INFO] [stdout] | [INFO] [stdout] 61 | let ay = if 1 < N { let a: CgarF64 = (&pos[1]).ref_into(); a.0 } else { 0.0 }; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pos[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/spatial_hash.rs:62:46 [INFO] [stdout] | [INFO] [stdout] 62 | let az = if 2 < N { let a: CgarF64 = (&pos[2]).ref_into(); a.0 } else { 0.0 }; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pos[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:391:54 [INFO] [stdout] | [INFO] [stdout] 391 | allocate_vertices_for_splits_no_topology(&mut a, &mut intersection_segments_a); [INFO] [stdout] | ^^^^^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:415:54 [INFO] [stdout] | [INFO] [stdout] 415 | allocate_vertices_for_splits_no_topology(&mut b, &mut intersection_segments_b); [INFO] [stdout] | ^^^^^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:444:49 [INFO] [stdout] | [INFO] [stdout] 444 | let mut a_coplanars = Self::build_links(&a, &mut intersection_segments_a); [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:445:49 [INFO] [stdout] | [INFO] [stdout] 445 | let mut b_coplanars = Self::build_links(&b, &mut intersection_segments_b); [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:452:13 [INFO] [stdout] | [INFO] [stdout] 452 | &mut intersection_segments_a, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 452 - &mut intersection_segments_a, [INFO] [stdout] 452 + &intersection_segments_a, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:453:13 [INFO] [stdout] | [INFO] [stdout] 453 | &mut a_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 453 - &mut a_coplanars, [INFO] [stdout] 453 + &a_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mesh/topology.rs:269:16 [INFO] [stdout] | [INFO] [stdout] 269 | if !(neg && pos) && !(z0 || z1 || z2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(z0 || z1 || z2 || neg && pos)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:451:13 [INFO] [stdout] | [INFO] [stdout] 451 | &b, [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:498:21 [INFO] [stdout] | [INFO] [stdout] 498 | &mut intersection_segments_b, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 498 - &mut intersection_segments_b, [INFO] [stdout] 498 + &intersection_segments_b, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:499:21 [INFO] [stdout] | [INFO] [stdout] 499 | &mut b_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 499 - &mut b_coplanars, [INFO] [stdout] 499 + &b_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:497:21 [INFO] [stdout] | [INFO] [stdout] 497 | &a, [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:525:21 [INFO] [stdout] | [INFO] [stdout] 525 | &mut intersection_segments_b, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 525 - &mut intersection_segments_b, [INFO] [stdout] 525 + &intersection_segments_b, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:526:21 [INFO] [stdout] | [INFO] [stdout] 526 | &mut b_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 526 - &mut b_coplanars, [INFO] [stdout] 526 + &b_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:524:21 [INFO] [stdout] | [INFO] [stdout] 524 | &a, [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:553:21 [INFO] [stdout] | [INFO] [stdout] 553 | &mut intersection_segments_b, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 553 - &mut intersection_segments_b, [INFO] [stdout] 553 + &intersection_segments_b, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | &mut b_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 554 - &mut b_coplanars, [INFO] [stdout] 554 + &b_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | &a, [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/mesh/topology.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 305 | / let sum = (self.vertices[vs[0]].position[i].ball_center_f64() + [INFO] [stdout] 306 | | self.vertices[vs[1]].position[i].ball_center_f64() + [INFO] [stdout] 307 | | self.vertices[vs[2]].position[i].ball_center_f64()) / 3.0; [INFO] [stdout] | |______________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 308 | sum [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 305 ~ [INFO] [stdout] 306 ~ (self.vertices[vs[0]].position[i].ball_center_f64() + [INFO] [stdout] 307 + self.vertices[vs[1]].position[i].ball_center_f64() + [INFO] [stdout] 308 + self.vertices[vs[2]].position[i].ball_center_f64()) / 3.0 [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/mesh_processing/boolean.rs:699:32 [INFO] [stdout] | [INFO] [stdout] 699 | intersection_segments: &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] 699 - intersection_segments: &Vec>, [INFO] [stdout] 699 + intersection_segments: &[IntersectionSegment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/boolean.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | / if let Some(f) = face_id { [INFO] [stdout] 714 | | if boundary_faces.contains(&f) { [INFO] [stdout] 715 | | let centroid = a.face_centroid_fast(f); [INFO] [stdout] 716 | | match b.point_in_mesh(tree_b, ¢roid) { [INFO] [stdout] ... | [INFO] [stdout] 724 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 713 ~ if let Some(f) = face_id [INFO] [stdout] 714 ~ && boundary_faces.contains(&f) { [INFO] [stdout] 715 | let centroid = a.face_centroid_fast(f); [INFO] [stdout] ... [INFO] [stdout] 722 | } [INFO] [stdout] 723 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:452:13 [INFO] [stdout] | [INFO] [stdout] 452 | / if let Some(f) = fopt { [INFO] [stdout] 453 | | if !self.faces[f].removed { faces.insert(f); } [INFO] [stdout] 454 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 452 ~ if let Some(f) = fopt [INFO] [stdout] 453 ~ && !self.faces[f].removed { faces.insert(f); } [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/mesh_processing/boolean.rs:733:15 [INFO] [stdout] | [INFO] [stdout] 733 | segments: &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] 733 - segments: &mut Vec>, [INFO] [stdout] 733 + segments: &mut [IntersectionSegment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh_processing/boolean.rs:872:32 [INFO] [stdout] | [INFO] [stdout] 872 | for (_, &a) in verts.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 872 - for (_, &a) in verts.iter().enumerate() { [INFO] [stdout] 872 + for &a in verts.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/mesh_processing/boolean.rs:889:21 [INFO] [stdout] | [INFO] [stdout] 889 | if !adj.get(&b).map_or(false, |nb| nb.contains(&c)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 889 - if !adj.get(&b).map_or(false, |nb| nb.contains(&c)) { [INFO] [stdout] 889 + if !adj.get(&b).is_some_and(|nb| nb.contains(&c)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh_processing/remesh.rs:88:31 [INFO] [stdout] | [INFO] [stdout] 88 | total_length_sq = &total_length_sq + &length_sq.to_f64().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 88 - total_length_sq = &total_length_sq + &length_sq.to_f64().unwrap(); [INFO] [stdout] 88 + total_length_sq = total_length_sq + length_sq.to_f64().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:609:13 [INFO] [stdout] | [INFO] [stdout] 609 | / if N == 3 { [INFO] [stdout] 610 | | if let Some((t, u, v)) = ray_triangle_intersection(p, dir, std::array::from_fn(|i| vs[i]), tolerance) { [INFO] [stdout] 611 | | if t.is_negative() { [INFO] [stdout] 612 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 672 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 609 ~ if N == 3 [INFO] [stdout] 610 ~ && let Some((t, u, v)) = ray_triangle_intersection(p, dir, std::array::from_fn(|i| vs[i]), tolerance) { [INFO] [stdout] 611 | if t.is_negative() { [INFO] [stdout] ... [INFO] [stdout] 670 | } [INFO] [stdout] 671 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/mesh_processing/remesh.rs:95:33 [INFO] [stdout] | [INFO] [stdout] 95 | let avg_length_sq = &total_length_sq / count as f64; [INFO] [stdout] | ----------------^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `total_length_sq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/mesh_processing/remesh.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | if v > 1.0 { v = 1.0; } else if v < -1.0 { v = -1.0; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `v = v.clamp(-1.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:247:19 [INFO] [stdout] | [INFO] [stdout] 247 | area_safe(&pa,&pb,&pc) && [INFO] [stdout] | ^^^ help: change this to: `pa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:247:23 [INFO] [stdout] | [INFO] [stdout] 247 | area_safe(&pa,&pb,&pc) && [INFO] [stdout] | ^^^ help: change this to: `pb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:247:27 [INFO] [stdout] | [INFO] [stdout] 247 | area_safe(&pa,&pb,&pc) && [INFO] [stdout] | ^^^ help: change this to: `pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:248:19 [INFO] [stdout] | [INFO] [stdout] 248 | area_safe(&pb,&pa,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:248:23 [INFO] [stdout] | [INFO] [stdout] 248 | area_safe(&pb,&pa,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:248:27 [INFO] [stdout] | [INFO] [stdout] 248 | area_safe(&pb,&pa,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:249:19 [INFO] [stdout] | [INFO] [stdout] 249 | area_safe(&pa,&pc,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:249:23 [INFO] [stdout] | [INFO] [stdout] 249 | area_safe(&pa,&pc,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | area_safe(&pa,&pc,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:250:19 [INFO] [stdout] | [INFO] [stdout] 250 | area_safe(&pb,&pd,&pc) [INFO] [stdout] | ^^^ help: change this to: `pb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:250:23 [INFO] [stdout] | [INFO] [stdout] 250 | area_safe(&pb,&pd,&pc) [INFO] [stdout] | ^^^ help: change this to: `pd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:250:27 [INFO] [stdout] | [INFO] [stdout] 250 | area_safe(&pb,&pd,&pc) [INFO] [stdout] | ^^^ help: change this to: `pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/mesh_processing/remesh.rs:258:9 [INFO] [stdout] | [INFO] [stdout] 258 | / let mut list = Vec::new(); [INFO] [stdout] 259 | | list.reserve(self.half_edges.len()/3); [INFO] [stdout] | |______________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut list = Vec::with_capacity(self.half_edges.len()/3);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/mesh/topology.rs:874:17 [INFO] [stdout] | [INFO] [stdout] 874 | if self.half_edges[h0].face == Some(face) { h0 } else { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 873 ~ (Some(h0), None) [INFO] [stdout] 874 ~ if self.half_edges[h0].face == Some(face) => { h0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/mesh/topology.rs:877:17 [INFO] [stdout] | [INFO] [stdout] 877 | if self.half_edges[h1].face == Some(face) { h1 } else { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 876 ~ (None, Some(h1)) [INFO] [stdout] 877 ~ if self.half_edges[h1].face == Some(face) => { h1 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/mesh_processing/remesh.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | / let mut candidates = Vec::new(); [INFO] [stdout] 315 | | candidates.reserve(self.half_edges.len()/4); [INFO] [stdout] | |____________________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut candidates = Vec::with_capacity(self.half_edges.len()/4);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/mesh_processing/remesh.rs:348:18 [INFO] [stdout] | [INFO] [stdout] 348 | (&(*p0) + &(*p1)).as_vector().scale(&T::from_num_den(1,2)).0 [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `p0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/mesh_processing/remesh.rs:348:27 [INFO] [stdout] | [INFO] [stdout] 348 | (&(*p0) + &(*p1)).as_vector().scale(&T::from_num_den(1,2)).0 [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `p1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` can be confused for the standard trait method `std::ops::Add::add` [INFO] [stdout] --> src/numeric/ball.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn add(self, o: Self) -> Self { [INFO] [stdout] 66 | | let (s, e) = two_sum(self.m, o.m); [INFO] [stdout] 67 | | Ball { [INFO] [stdout] 68 | | m: s, [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Add` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `sub` can be confused for the standard trait method `std::ops::Sub::sub` [INFO] [stdout] --> src/numeric/ball.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / pub fn sub(self, o: Self) -> Self { [INFO] [stdout] 74 | | self.add(Ball { m: -o.m, r: o.r }) [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Sub` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `neg` can be confused for the standard trait method `std::ops::Neg::neg` [INFO] [stdout] --> src/numeric/ball.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / pub fn neg(self) -> Self { [INFO] [stdout] 78 | | Ball { [INFO] [stdout] 79 | | m: -self.m, [INFO] [stdout] 80 | | r: self.r, [INFO] [stdout] 81 | | } [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Neg` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mul` can be confused for the standard trait method `std::ops::Mul::mul` [INFO] [stdout] --> src/numeric/ball.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | / pub fn mul(self, o: Self) -> Self { [INFO] [stdout] 86 | | let (p, e) = two_prod(self.m, o.m); [INFO] [stdout] 87 | | Ball { [INFO] [stdout] 88 | | m: p, [INFO] [stdout] ... | [INFO] [stdout] 95 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Mul` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `div` can be confused for the standard trait method `std::ops::Div::div` [INFO] [stdout] --> src/numeric/ball.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | / pub fn div(self, o: Self) -> Self { [INFO] [stdout] 110 | | self.mul(o.recip()) [INFO] [stdout] 111 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Div` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh/topology.rs:1154:16 [INFO] [stdout] | [INFO] [stdout] 1154 | if &t_plane < &(-tol.clone()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 1154 - if &t_plane < &(-tol.clone()) { [INFO] [stdout] 1154 + if t_plane < (-tol.clone()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_f64.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return Self(EPS); [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] 56 - return Self(EPS); [INFO] [stdout] 56 + Self(EPS) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1201:13 [INFO] [stdout] | [INFO] [stdout] 1201 | / if let Some((t_hit, u_seg)) = [INFO] [stdout] 1202 | | ray_segment_intersection_2d_robust(&from2, &dir2, &a2, &b2, &tol) [INFO] [stdout] 1203 | | { [INFO] [stdout] 1204 | | if t_hit >= tol { [INFO] [stdout] ... | [INFO] [stdout] 1220 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1202 ~ ray_segment_intersection_2d_robust(&from2, &dir2, &a2, &b2, &tol) [INFO] [stdout] 1203 ~ && t_hit >= tol { [INFO] [stdout] 1204 | match &mut best { [INFO] [stdout] ... [INFO] [stdout] 1217 | } [INFO] [stdout] 1218 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_f64.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | return (self.0 - other.0).abs() < EPS; [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] 103 - return (self.0 - other.0).abs() < EPS; [INFO] [stdout] 103 + (self.0 - other.0).abs() < EPS [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/mesh/topology.rs:1208:48 [INFO] [stdout] | [INFO] [stdout] 1208 | ... if &t_hit < best_t { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 1209 | | ... *best_he = he_idx; [INFO] [stdout] 1210 | | ... *best_t = t_hit; [INFO] [stdout] 1211 | | ... *best_u = u_seg; [INFO] [stdout] 1212 | | ... } else if near_zero(&(&t_hit - best_t)) && he_idx < *best_he { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/mesh/topology.rs:1212:90 [INFO] [stdout] | [INFO] [stdout] 1212 | ... } else if near_zero(&(&t_hit - best_t)) && he_idx < *best_he { [INFO] [stdout] | ____________________________________________________________________________________^ [INFO] [stdout] 1213 | | ... *best_he = he_idx; [INFO] [stdout] 1214 | | ... *best_t = t_hit; [INFO] [stdout] 1215 | | ... *best_u = u_seg; [INFO] [stdout] 1216 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 125 | impl<'a, 'b> Add<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - impl<'a, 'b> Add<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 125 + impl<'b> Add<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:143:6 [INFO] [stdout] | [INFO] [stdout] 143 | impl<'a, 'b> Sub<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 143 - impl<'a, 'b> Sub<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 143 + impl<'b> Sub<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 148 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:161:6 [INFO] [stdout] | [INFO] [stdout] 161 | impl<'a, 'b> Mul<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 161 - impl<'a, 'b> Mul<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 161 + impl<'b> Mul<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:166:26 [INFO] [stdout] | [INFO] [stdout] 166 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:179:6 [INFO] [stdout] | [INFO] [stdout] 179 | impl<'a, 'b> Div<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 179 - impl<'a, 'b> Div<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 179 + impl<'b> Div<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:184:26 [INFO] [stdout] | [INFO] [stdout] 184 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: unneeded `return` statement [INFO] [stdout] --> src/mesh/topology.rs:1323:9 [INFO] [stdout] | [INFO] [stdout] 1323 | return FindFaceResult::Inside { f, bary: (l0, l1, l2) }; [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] 1323 - return FindFaceResult::Inside { f, bary: (l0, l1, l2) }; [INFO] [stdout] 1323 + FindFaceResult::Inside { f, bary: (l0, l1, l2) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1305:9 [INFO] [stdout] | [INFO] [stdout] 1305 | / if zc == 1 { [INFO] [stdout] 1306 | | if let Some((he_guess, mut u_bary)) = self.edge_and_u_from_bary_zero(f, &l0, &l1, &l2) { [INFO] [stdout] 1307 | | if u_bary.is_negative() { u_bary = zero.clone(); } [INFO] [stdout] 1308 | | if (&u_bary - &one).is_positive() { u_bary = one.clone(); } [INFO] [stdout] ... | [INFO] [stdout] 1311 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1305 ~ if zc == 1 [INFO] [stdout] 1306 ~ && let Some((he_guess, mut u_bary)) = self.edge_and_u_from_bary_zero(f, &l0, &l1, &l2) { [INFO] [stdout] 1307 | if u_bary.is_negative() { u_bary = zero.clone(); } [INFO] [stdout] 1308 | if (&u_bary - &one).is_positive() { u_bary = one.clone(); } [INFO] [stdout] 1309 | return FindFaceResult::OnEdge { f, he: he_guess, u: u_bary }; [INFO] [stdout] 1310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:369:6 [INFO] [stdout] | [INFO] [stdout] 369 | impl<'a> Neg for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 369 - impl<'a> Neg for &'a CgarF64 { [INFO] [stdout] 369 + impl Neg for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_rational.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | return 0.into(); // no tolerance for exact rational numbers [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] 57 - return 0.into(); // no tolerance for exact rational numbers [INFO] [stdout] 57 + 0.into()// no tolerance for exact rational numbers [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:128:6 [INFO] [stdout] | [INFO] [stdout] 128 | impl<'a, 'b> Add<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 128 - impl<'a, 'b> Add<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 128 + impl<'b> Add<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | impl<'a, 'b> Sub<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 146 - impl<'a, 'b> Sub<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 146 + impl<'b> Sub<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1399:17 [INFO] [stdout] | [INFO] [stdout] 1399 | / if let Some(fnbr) = mesh.half_edges[tw].face { [INFO] [stdout] 1400 | | if !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1401 | | q.push_back(fnbr); [INFO] [stdout] 1402 | | } [INFO] [stdout] 1403 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1399 ~ if let Some(fnbr) = mesh.half_edges[tw].face [INFO] [stdout] 1400 ~ && !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1401 | q.push_back(fnbr); [INFO] [stdout] 1402 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:164:6 [INFO] [stdout] | [INFO] [stdout] 164 | impl<'a, 'b> Mul<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 164 - impl<'a, 'b> Mul<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 164 + impl<'b> Mul<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:182:6 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a, 'b> Div<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 182 - impl<'a, 'b> Div<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 182 + impl<'b> Div<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_rational.rs:289:9 [INFO] [stdout] | [INFO] [stdout] 289 | return self.clone(); [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] 289 - return self.clone(); [INFO] [stdout] 289 + self.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:368:6 [INFO] [stdout] | [INFO] [stdout] 368 | impl<'a> Neg for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 368 - impl<'a> Neg for &'a CgarRational { [INFO] [stdout] 368 + impl Neg for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/numeric/lazy_exact.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | /// Returns -1, 0, or +1. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 110 | /// Returns -1, 0, or +1. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1607:17 [INFO] [stdout] | [INFO] [stdout] 1607 | / if let Some(fnbr) = mesh.half_edges[tw].face { [INFO] [stdout] 1608 | | if !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1609 | | q.push_back(fnbr); [INFO] [stdout] 1610 | | } [INFO] [stdout] 1611 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1607 ~ if let Some(fnbr) = mesh.half_edges[tw].face [INFO] [stdout] 1608 ~ && !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1609 | q.push_back(fnbr); [INFO] [stdout] 1610 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::filter` [INFO] [stdout] --> src/numeric/lazy_exact.rs:358:17 [INFO] [stdout] | [INFO] [stdout] 358 | / if let Some(v) = e.to_f64() { [INFO] [stdout] 359 | | // accept only if round-trip is exact (dyadic) [INFO] [stdout] 360 | | if CgarRational::from(v) == **e { [INFO] [stdout] 361 | | Some(v) [INFO] [stdout] ... | [INFO] [stdout] 366 | | None [INFO] [stdout] 367 | | } [INFO] [stdout] | |_________________^ help: try: `e.to_f64().filter(|&v| CgarRational::from(v) == **e)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter [INFO] [stdout] = note: `#[warn(clippy::manual_filter)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/topology.rs:1808:17 [INFO] [stdout] | [INFO] [stdout] 1808 | / if let Some(fnbr) = mesh.half_edges[tw].face { [INFO] [stdout] 1809 | | if !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1810 | | q.push_back(fnbr); [INFO] [stdout] 1811 | | } [INFO] [stdout] 1812 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1808 ~ if let Some(fnbr) = mesh.half_edges[tw].face [INFO] [stdout] 1809 ~ && !mesh.faces[fnbr].removed && !seen.contains(&fnbr) { [INFO] [stdout] 1810 | q.push_back(fnbr); [INFO] [stdout] 1811 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/numeric/lazy_exact.rs:587:17 [INFO] [stdout] | [INFO] [stdout] 587 | / if b.is_exact_zero() { [INFO] [stdout] 588 | | return a.clone().0.kind.clone(); [INFO] [stdout] 589 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 586 ~ Sub(a, b) [INFO] [stdout] 587 ~ if b.is_exact_zero() => { [INFO] [stdout] 588 | return a.clone().0.kind.clone(); [INFO] [stdout] 589 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/numeric/lazy_exact.rs:611:17 [INFO] [stdout] | [INFO] [stdout] 611 | / if x.is_exact_zero() { [INFO] [stdout] 612 | | return Kind::LeafExact(Arc::new(CgarRational::from(0))); [INFO] [stdout] 613 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 610 ~ Neg(x) [INFO] [stdout] 611 ~ if x.is_exact_zero() => { [INFO] [stdout] 612 | return Kind::LeafExact(Arc::new(CgarRational::from(0))); [INFO] [stdout] 613 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh/topology.rs:1968:22 [INFO] [stdout] | [INFO] [stdout] 1968 | let d2 = (&(point - &closest).as_vector()).norm2(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(point - &closest).as_vector()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:688:6 [INFO] [stdout] | [INFO] [stdout] 688 | impl<'a, 'b> Add<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 688 - impl<'a, 'b> Add<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 688 + impl<'b> Add<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:702:6 [INFO] [stdout] | [INFO] [stdout] 702 | impl<'a, 'b> Sub<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 702 - impl<'a, 'b> Sub<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 702 + impl<'b> Sub<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:716:6 [INFO] [stdout] | [INFO] [stdout] 716 | impl<'a, 'b> Mul<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 716 - impl<'a, 'b> Mul<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 716 + impl<'b> Mul<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:730:6 [INFO] [stdout] | [INFO] [stdout] 730 | impl<'a, 'b> Div<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 730 - impl<'a, 'b> Div<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 730 + impl<'b> Div<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:744:6 [INFO] [stdout] | [INFO] [stdout] 744 | impl<'a> Neg for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 744 - impl<'a> Neg for &'a LazyExact { [INFO] [stdout] 744 + impl Neg for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mesh/topology.rs:2108:9 [INFO] [stdout] | [INFO] [stdout] 2108 | / return self.edge_map.contains_key(&(vertex_a, vertex_b)) [INFO] [stdout] 2109 | | || self.edge_map.contains_key(&(vertex_b, vertex_a)); [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] 2108 ~ self.edge_map.contains_key(&(vertex_a, vertex_b)) [INFO] [stdout] 2109 ~ || self.edge_map.contains_key(&(vertex_b, vertex_a)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/numeric/lazy_exact.rs:898:21 [INFO] [stdout] | [INFO] [stdout] 898 | *self = &*self - &rhs; [INFO] [stdout] | ^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/numeric/lazy_exact.rs:898:30 [INFO] [stdout] | [INFO] [stdout] 898 | *self = &*self - &rhs; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/topology.rs:2177:47 [INFO] [stdout] | [INFO] [stdout] 2177 | for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 2177 - for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] 2177 + for he in self.half_edges.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh/topology.rs:2232:47 [INFO] [stdout] | [INFO] [stdout] 2232 | for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 2232 - for (_i, he) in self.half_edges.iter().enumerate() { [INFO] [stdout] 2232 + for he in self.half_edges.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:167:21 [INFO] [stdout] | [INFO] [stdout] 167 | T::from(cx.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `cx.clone()` [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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:168:21 [INFO] [stdout] | [INFO] [stdout] 168 | T::from(&(cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&(cy + &T::from_num_den(2, 1)) * &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:168:29 [INFO] [stdout] | [INFO] [stdout] 168 | T::from(&(cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:168:62 [INFO] [stdout] | [INFO] [stdout] 168 | T::from(&(cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:41 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cx - &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:55 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:66 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:72 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:80 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:85 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:41 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cx + &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:55 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:66 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:72 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:80 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:85 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2679:25 [INFO] [stdout] | [INFO] [stdout] 2679 | let u_num = w.cross(&r); [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:258:13 [INFO] [stdout] | [INFO] [stdout] 258 | T::from(cx.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `cx.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:259:13 [INFO] [stdout] | [INFO] [stdout] 259 | T::from(&(&cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&(&cy + &T::from_num_den(2, 1)) * &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2683:23 [INFO] [stdout] | [INFO] [stdout] 2683 | x >= &meps && x <= &eps [INFO] [stdout] | ^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:261:48 [INFO] [stdout] | [INFO] [stdout] 261 | let p_super1 = Point2::::from_vals([T::from(&cx - &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cx - &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2683:28 [INFO] [stdout] | [INFO] [stdout] 2683 | x >= &meps && x <= &eps [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:261:80 [INFO] [stdout] | [INFO] [stdout] 261 | let p_super1 = Point2::::from_vals([T::from(&cx - &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:262:48 [INFO] [stdout] | [INFO] [stdout] 262 | let p_super2 = Point2::::from_vals([T::from(&cx + &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cx + &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2693:12 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2693:18 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:262:80 [INFO] [stdout] | [INFO] [stdout] 262 | let p_super2 = Point2::::from_vals([T::from(&cx + &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2693:26 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2693:31 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh/topology.rs:2693:39 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2693 - if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] 2693 + if &t >= &eps && &u > &eps && u <= (&T::one() + &eps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2693:46 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2693:59 [INFO] [stdout] | [INFO] [stdout] 2693 | if &t >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2724:8 [INFO] [stdout] | [INFO] [stdout] 2724 | if &t_exit < &eps { [INFO] [stdout] | ^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2724:18 [INFO] [stdout] | [INFO] [stdout] 2724 | if &t_exit < &eps { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2729:20 [INFO] [stdout] | [INFO] [stdout] 2729 | let t_hit = if &t_enter >= &eps { t_enter } else { t_exit }; [INFO] [stdout] | ^^^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2729:32 [INFO] [stdout] | [INFO] [stdout] 2729 | let t_hit = if &t_enter >= &eps { t_enter } else { t_exit }; [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2742:8 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2742:18 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2742:26 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2742:31 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh/topology.rs:2742:39 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2742 - if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] 2742 + if &t_hit >= &eps && &u > &eps && u <= (&T::one() + &eps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/mesh/topology.rs:2742:46 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh/topology.rs:2742:59 [INFO] [stdout] | [INFO] [stdout] 2742 | if &t_hit >= &eps && &u > &eps && &u <= &(&T::one() + &eps) { [INFO] [stdout] | ^^^^ help: change this to: `eps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(&owner) = self.edge_map.get(&(u, v)) { [INFO] [stdout] 88 | | if owner == h { self.edge_map.remove(&(u, v)); } [INFO] [stdout] 89 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(&owner) = self.edge_map.get(&(u, v)) [INFO] [stdout] 88 ~ && owner == h { self.edge_map.remove(&(u, v)); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `inc.get(0)` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:517:36 [INFO] [stdout] | [INFO] [stdout] 517 | if let Some(&ti) = inc.get(0) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `inc.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | / if m.half_edges[h].vertex == v || m.half_edges[m.half_edges[h].twin].vertex == v { [INFO] [stdout] 140 | | if let Some(hh) = normalize_to_outgoing(m,h,v) { return Some(hh); } [INFO] [stdout] 141 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 139 ~ if (m.half_edges[h].vertex == v || m.half_edges[m.half_edges[h].twin].vertex == v) { [INFO] [stdout] 140 ~ && let Some(hh) = normalize_to_outgoing(m,h,v) { return Some(hh); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:583:21 [INFO] [stdout] | [INFO] [stdout] 583 | / if !constrained.contains(&cross_e) { [INFO] [stdout] 584 | | if let Some(new_e) = self.flip_shared_edge_with_adj( [INFO] [stdout] 585 | | cross_e, [INFO] [stdout] 586 | | adj.edge2tris[&cross_e][0], [INFO] [stdout] ... | [INFO] [stdout] 600 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 583 ~ if !constrained.contains(&cross_e) [INFO] [stdout] 584 ~ && let Some(new_e) = self.flip_shared_edge_with_adj( [INFO] [stdout] 585 | cross_e, [INFO] [stdout] ... [INFO] [stdout] 598 | continue; [INFO] [stdout] 599 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:695:20 [INFO] [stdout] | [INFO] [stdout] 695 | if best_score.as_ref().map_or(true, |bs| score > *bs) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 695 - if best_score.as_ref().map_or(true, |bs| score > *bs) { [INFO] [stdout] 695 + if best_score.as_ref().is_none_or(|bs| score > *bs) { [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/mesh/triangle.rs:296:45 [INFO] [stdout] | [INFO] [stdout] 296 | &mut self, start_b: usize, visited: &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] 296 - &mut self, start_b: usize, visited: &mut Vec [INFO] [stdout] 296 + &mut self, start_b: usize, visited: &mut [bool] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:364:17 [INFO] [stdout] | [INFO] [stdout] 364 | / if let Some(&owner) = m.edge_map.get(&(u, v)) { [INFO] [stdout] 365 | | if owner == h { [INFO] [stdout] 366 | | m.edge_map.remove(&(u, v)); [INFO] [stdout] 367 | | } [INFO] [stdout] 368 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 364 ~ if let Some(&owner) = m.edge_map.get(&(u, v)) [INFO] [stdout] 365 ~ && owner == h { [INFO] [stdout] 366 | m.edge_map.remove(&(u, v)); [INFO] [stdout] 367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:372:13 [INFO] [stdout] | [INFO] [stdout] 372 | / if let Some(&owner) = m.edge_map.get(&(u, v)) { [INFO] [stdout] 373 | | if owner == h { [INFO] [stdout] 374 | | m.edge_map.remove(&(u, v)); [INFO] [stdout] 375 | | } [INFO] [stdout] 376 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 372 ~ if let Some(&owner) = m.edge_map.get(&(u, v)) [INFO] [stdout] 373 ~ && owner == h { [INFO] [stdout] 374 | m.edge_map.remove(&(u, v)); [INFO] [stdout] 375 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:895:1 [INFO] [stdout] | [INFO] [stdout] 895 | / fn exit_edge_fast_f64( [INFO] [stdout] 896 | | points: &[Point2], [INFO] [stdout] 897 | | adj: &Adj, [INFO] [stdout] 898 | | tris: &[Triangle], [INFO] [stdout] ... | [INFO] [stdout] 903 | | by: f64, [INFO] [stdout] 904 | | ) -> Option<(Edge, Option)> { [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: the loop variable `i` is only used to index `new_borders` [INFO] [stdout] --> src/mesh/triangle.rs:474:22 [INFO] [stdout] | [INFO] [stdout] 474 | for i in 0..nb_count { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 474 - for i in 0..nb_count { [INFO] [stdout] 474 + for in new_borders.iter().take(nb_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/mesh/triangle.rs:548:13 [INFO] [stdout] | [INFO] [stdout] 548 | / for h in 0..m.half_edges.len() { [INFO] [stdout] 549 | | if is_outgoing_from(m, h, v) { [INFO] [stdout] 550 | | return Some(h); [INFO] [stdout] ... | [INFO] [stdout] 553 | | None [INFO] [stdout] | |________________^ help: replace with an iterator: `(0..m.half_edges.len()).find(|&h| is_outgoing_from(m, h, v))` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `new_borders` [INFO] [stdout] --> src/mesh/triangle.rs:565:18 [INFO] [stdout] | [INFO] [stdout] 565 | for i in 0..nb_count { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 565 - for i in 0..nb_count { [INFO] [stdout] 565 + for in new_borders.iter().take(nb_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1042:24 [INFO] [stdout] | [INFO] [stdout] 1042 | if best.as_ref().map_or(true, |(_, p)| proj > *p) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 1042 - if best.as_ref().map_or(true, |(_, p)| proj > *p) { [INFO] [stdout] 1042 + if best.as_ref().is_none_or(|(_, p)| proj > *p) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is used to index `pts` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1163:14 [INFO] [stdout] | [INFO] [stdout] 1163 | for k in 0..pts.len() { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1163 - for k in 0..pts.len() { [INFO] [stdout] 1163 + for (k, ) in pts.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh/triangle.rs:786:13 [INFO] [stdout] | [INFO] [stdout] 786 | / if b != usize::MAX && b < self.half_edges.len() { [INFO] [stdout] 787 | | if !self.half_edges[b].removed && self.half_edges[b].face.is_none() { [INFO] [stdout] 788 | | debug_assert!( [INFO] [stdout] 789 | | self.half_edges[b].next != b && self.half_edges[b].prev != b, [INFO] [stdout] ... | [INFO] [stdout] 794 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 786 ~ if b != usize::MAX && b < self.half_edges.len() [INFO] [stdout] 787 ~ && !self.half_edges[b].removed && self.half_edges[b].face.is_none() { [INFO] [stdout] 788 | debug_assert!( [INFO] [stdout] ... [INFO] [stdout] 792 | ); [INFO] [stdout] 793 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `he_opt` after checking its variant with `is_some` [INFO] [stdout] --> src/mesh_processing/batching.rs:168:26 [INFO] [stdout] | [INFO] [stdout] 167 | if endpoint_flag == 1 && he_opt.is_some() { [INFO] [stdout] | ---------------- the check is happening here [INFO] [stdout] 168 | let he = he_opt.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/mesh_processing/batching.rs:88:28 [INFO] [stdout] | [INFO] [stdout] 88 | intersection_segments: &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] 88 - intersection_segments: &mut Vec>, [INFO] [stdout] 88 + intersection_segments: &mut [IntersectionSegment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mesh_processing/batching.rs:102:24 [INFO] [stdout] | [INFO] [stdout] 102 | let mut keyed_map: AHashMap<(ApproxPointKey, (usize, usize), [usize; 2], u8), usize> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:119:39 [INFO] [stdout] | [INFO] [stdout] 119 | let canonical = point_key(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | / if let Some(hint) = ep.vertex_hint { [INFO] [stdout] 148 | | if hint[0] != usize::MAX [INFO] [stdout] 149 | | && (edge_key == (usize::MAX, usize::MAX) || endpoint_flag == 1) [INFO] [stdout] ... | [INFO] [stdout] 159 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 147 ~ if let Some(hint) = ep.vertex_hint [INFO] [stdout] 148 ~ && hint[0] != usize::MAX [INFO] [stdout] 149 | && (edge_key == (usize::MAX, usize::MAX) || endpoint_flag == 1) [INFO] [stdout] ... [INFO] [stdout] 157 | continue; [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | / if let (Some(he), Some(u_raw)) = (he_opt, u_opt_f64) { [INFO] [stdout] 189 | | if endpoint_flag == 0 { [INFO] [stdout] 190 | | if let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] 191 | | let u_can = canonicalize_u_for_edge(mesh, he, ek, u_raw); [INFO] [stdout] ... | [INFO] [stdout] 207 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 188 ~ if let (Some(he), Some(u_raw)) = (he_opt, u_opt_f64) [INFO] [stdout] 189 ~ && endpoint_flag == 0 { [INFO] [stdout] 190 | if let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] ... [INFO] [stdout] 205 | } [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | / if endpoint_flag == 0 { [INFO] [stdout] 190 | | if let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] 191 | | let u_can = canonicalize_u_for_edge(mesh, he, ek, u_raw); [INFO] [stdout] 192 | | let ub = bucket_u(u_can, tol_f64); [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 189 ~ if endpoint_flag == 0 [INFO] [stdout] 190 ~ && let Some(ek) = undirected_edge_key(mesh, he) { [INFO] [stdout] 191 | let u_can = canonicalize_u_for_edge(mesh, he, ek, u_raw); [INFO] [stdout] ... [INFO] [stdout] 204 | continue; [INFO] [stdout] 205 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1520:16 [INFO] [stdout] | [INFO] [stdout] 1520 | if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 1520 - if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] 1520 + if best.as_ref().is_none_or(|&(_, ref s)| *score > *s) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1520:44 [INFO] [stdout] | [INFO] [stdout] 1520 | if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1520 - if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] 1520 + if best.as_ref().map_or(true, |(_, s)| *score > *s) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:197:77 [INFO] [stdout] | [INFO] [stdout] 197 | ... let (vid, _existed) = mesh.get_or_insert_vertex(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:216:57 [INFO] [stdout] | [INFO] [stdout] 216 | let new_vid = mesh.get_or_insert_vertex(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:234:53 [INFO] [stdout] | [INFO] [stdout] 234 | let new_vid = mesh.get_or_insert_vertex(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:251:39 [INFO] [stdout] | [INFO] [stdout] 251 | let canonical = point_key(&ep_pos); [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/batching.rs:286:47 [INFO] [stdout] | [INFO] [stdout] 286 | mesh.get_or_insert_vertex(&ep_pos).0 [INFO] [stdout] | ^^^^^^^ help: change this to: `ep_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/mesh_processing/batching.rs:410:1 [INFO] [stdout] | [INFO] [stdout] 410 | / fn push_vertex_uv( [INFO] [stdout] 411 | | mesh: &Mesh, [INFO] [stdout] 412 | | g2l: &mut AHashMap, [INFO] [stdout] 413 | | verts_global: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 425 | | + std::ops::Mul<&'x T, Output = T> [INFO] [stdout] 426 | | + std::ops::Div<&'x T, Output = T>, [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: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:622:13 [INFO] [stdout] | [INFO] [stdout] 622 | / if va != usize::MAX && vb != usize::MAX { [INFO] [stdout] 623 | | if let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) { [INFO] [stdout] 624 | | if la != lb { [INFO] [stdout] 625 | | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] ... | [INFO] [stdout] 628 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 622 ~ if va != usize::MAX && vb != usize::MAX [INFO] [stdout] 623 ~ && let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) { [INFO] [stdout] 624 | if la != lb { [INFO] [stdout] 625 | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] 626 | } [INFO] [stdout] 627 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/batching.rs:623:17 [INFO] [stdout] | [INFO] [stdout] 623 | / if let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) { [INFO] [stdout] 624 | | if la != lb { [INFO] [stdout] 625 | | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] 626 | | } [INFO] [stdout] 627 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 623 ~ if let (Some(&la), Some(&lb)) = (g2l.get(&va), g2l.get(&vb)) [INFO] [stdout] 624 ~ && la != lb { [INFO] [stdout] 625 | add_split_or_chain_uv(la, lb, &mut segments, &points_uv); [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/mesh_processing/batching.rs:882:6 [INFO] [stdout] | [INFO] [stdout] 882 | (t >= -EPS && t <= 1.0 + EPS, t) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-EPS..=1.0 + EPS).contains(&t)` [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: this `map_or` can be simplified [INFO] [stdout] --> src/mesh_processing/batching.rs:922:12 [INFO] [stdout] | [INFO] [stdout] 922 | if best.as_ref().map_or(true, |(_, bd2)| d2 < *bd2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 922 - if best.as_ref().map_or(true, |(_, bd2)| d2 < *bd2) { [INFO] [stdout] 922 + if best.as_ref().is_none_or(|(_, bd2)| d2 < *bd2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh_processing/boolean.rs:67:31 [INFO] [stdout] | [INFO] [stdout] 67 | let tol_approx: CgarF64 = (&tol).ref_into(); [INFO] [stdout] | ^^^^^^ help: change this to: `tol` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/mesh_processing/boolean.rs:72:27 [INFO] [stdout] | [INFO] [stdout] 72 | let ai: CgarF64 = (&p[i]).ref_into(); [INFO] [stdout] | ^^^^^^^ help: change this to: `p[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `f` is used to index `inside` [INFO] [stdout] --> src/mesh_processing/boolean.rs:141:22 [INFO] [stdout] | [INFO] [stdout] 141 | for f in 0..self.faces.len() { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 141 - for f in 0..self.faces.len() { [INFO] [stdout] 141 + for (f, ) in inside.iter_mut().enumerate().take(self.faces.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:171:17 [INFO] [stdout] | [INFO] [stdout] 171 | &self, [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:172:17 [INFO] [stdout] | [INFO] [stdout] 172 | &other, [INFO] [stdout] | ^^^^^^ help: change this to: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `seg_idx` is only used to index `intersection_segments` [INFO] [stdout] --> src/mesh_processing/boolean.rs:180:28 [INFO] [stdout] | [INFO] [stdout] 180 | for seg_idx in 0..intersection_segments.len() { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 180 - for seg_idx in 0..intersection_segments.len() { [INFO] [stdout] 180 + for in &intersection_segments { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/boolean.rs:222:21 [INFO] [stdout] | [INFO] [stdout] 222 | / if let Some(pv) = paired { [INFO] [stdout] 223 | | if pv.iter().any(|&pf| pf == nbr) { [INFO] [stdout] 224 | | // this nbr is the other half of a segment splitting curr [INFO] [stdout] 225 | | continue; [INFO] [stdout] 226 | | } [INFO] [stdout] 227 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 222 ~ if let Some(pv) = paired [INFO] [stdout] 223 ~ && pv.iter().any(|&pf| pf == nbr) { [INFO] [stdout] 224 | // this nbr is the other half of a segment splitting curr [INFO] [stdout] 225 | continue; [INFO] [stdout] 226 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/mesh_processing/boolean.rs:223:28 [INFO] [stdout] | [INFO] [stdout] 223 | if pv.iter().any(|&pf| pf == nbr) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pv.contains(&nbr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:391:54 [INFO] [stdout] | [INFO] [stdout] 391 | allocate_vertices_for_splits_no_topology(&mut a, &mut intersection_segments_a); [INFO] [stdout] | ^^^^^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:415:54 [INFO] [stdout] | [INFO] [stdout] 415 | allocate_vertices_for_splits_no_topology(&mut b, &mut intersection_segments_b); [INFO] [stdout] | ^^^^^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:444:49 [INFO] [stdout] | [INFO] [stdout] 444 | let mut a_coplanars = Self::build_links(&a, &mut intersection_segments_a); [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:445:49 [INFO] [stdout] | [INFO] [stdout] 445 | let mut b_coplanars = Self::build_links(&b, &mut intersection_segments_b); [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:452:13 [INFO] [stdout] | [INFO] [stdout] 452 | &mut intersection_segments_a, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 452 - &mut intersection_segments_a, [INFO] [stdout] 452 + &intersection_segments_a, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:453:13 [INFO] [stdout] | [INFO] [stdout] 453 | &mut a_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 453 - &mut a_coplanars, [INFO] [stdout] 453 + &a_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:451:13 [INFO] [stdout] | [INFO] [stdout] 451 | &b, [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:498:21 [INFO] [stdout] | [INFO] [stdout] 498 | &mut intersection_segments_b, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 498 - &mut intersection_segments_b, [INFO] [stdout] 498 + &intersection_segments_b, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:499:21 [INFO] [stdout] | [INFO] [stdout] 499 | &mut b_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 499 - &mut b_coplanars, [INFO] [stdout] 499 + &b_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:497:21 [INFO] [stdout] | [INFO] [stdout] 497 | &a, [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:525:21 [INFO] [stdout] | [INFO] [stdout] 525 | &mut intersection_segments_b, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 525 - &mut intersection_segments_b, [INFO] [stdout] 525 + &intersection_segments_b, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:526:21 [INFO] [stdout] | [INFO] [stdout] 526 | &mut b_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 526 - &mut b_coplanars, [INFO] [stdout] 526 + &b_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:524:21 [INFO] [stdout] | [INFO] [stdout] 524 | &a, [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:553:21 [INFO] [stdout] | [INFO] [stdout] 553 | &mut intersection_segments_b, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 553 - &mut intersection_segments_b, [INFO] [stdout] 553 + &intersection_segments_b, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `classify_faces_inside_intersection_loops` doesn't need a mutable reference [INFO] [stdout] --> src/mesh_processing/boolean.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | &mut b_coplanars, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 554 - &mut b_coplanars, [INFO] [stdout] 554 + &b_coplanars, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/boolean.rs:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | &a, [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mesh_processing/boolean.rs:699:32 [INFO] [stdout] | [INFO] [stdout] 699 | intersection_segments: &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] 699 - intersection_segments: &Vec>, [INFO] [stdout] 699 + intersection_segments: &[IntersectionSegment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mesh_processing/boolean.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | / if let Some(f) = face_id { [INFO] [stdout] 714 | | if boundary_faces.contains(&f) { [INFO] [stdout] 715 | | let centroid = a.face_centroid_fast(f); [INFO] [stdout] 716 | | match b.point_in_mesh(tree_b, ¢roid) { [INFO] [stdout] ... | [INFO] [stdout] 724 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 713 ~ if let Some(f) = face_id [INFO] [stdout] 714 ~ && boundary_faces.contains(&f) { [INFO] [stdout] 715 | let centroid = a.face_centroid_fast(f); [INFO] [stdout] ... [INFO] [stdout] 722 | } [INFO] [stdout] 723 ~ } [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/mesh_processing/boolean.rs:733:15 [INFO] [stdout] | [INFO] [stdout] 733 | segments: &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] 733 - segments: &mut Vec>, [INFO] [stdout] 733 + segments: &mut [IntersectionSegment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/mesh_processing/boolean.rs:872:32 [INFO] [stdout] | [INFO] [stdout] 872 | for (_, &a) in verts.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 872 - for (_, &a) in verts.iter().enumerate() { [INFO] [stdout] 872 + for &a in verts.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/mesh_processing/boolean.rs:889:21 [INFO] [stdout] | [INFO] [stdout] 889 | if !adj.get(&b).map_or(false, |nb| nb.contains(&c)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 889 - if !adj.get(&b).map_or(false, |nb| nb.contains(&c)) { [INFO] [stdout] 889 + if !adj.get(&b).is_some_and(|nb| nb.contains(&c)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/mesh_processing/remesh.rs:88:31 [INFO] [stdout] | [INFO] [stdout] 88 | total_length_sq = &total_length_sq + &length_sq.to_f64().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 88 - total_length_sq = &total_length_sq + &length_sq.to_f64().unwrap(); [INFO] [stdout] 88 + total_length_sq = total_length_sq + length_sq.to_f64().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/mesh_processing/remesh.rs:95:33 [INFO] [stdout] | [INFO] [stdout] 95 | let avg_length_sq = &total_length_sq / count as f64; [INFO] [stdout] | ----------------^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `total_length_sq` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/mesh_processing/remesh.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | if v > 1.0 { v = 1.0; } else if v < -1.0 { v = -1.0; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `v = v.clamp(-1.0, 1.0);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:247:19 [INFO] [stdout] | [INFO] [stdout] 247 | area_safe(&pa,&pb,&pc) && [INFO] [stdout] | ^^^ help: change this to: `pa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:247:23 [INFO] [stdout] | [INFO] [stdout] 247 | area_safe(&pa,&pb,&pc) && [INFO] [stdout] | ^^^ help: change this to: `pb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:247:27 [INFO] [stdout] | [INFO] [stdout] 247 | area_safe(&pa,&pb,&pc) && [INFO] [stdout] | ^^^ help: change this to: `pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:248:19 [INFO] [stdout] | [INFO] [stdout] 248 | area_safe(&pb,&pa,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:248:23 [INFO] [stdout] | [INFO] [stdout] 248 | area_safe(&pb,&pa,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:248:27 [INFO] [stdout] | [INFO] [stdout] 248 | area_safe(&pb,&pa,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:249:19 [INFO] [stdout] | [INFO] [stdout] 249 | area_safe(&pa,&pc,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:249:23 [INFO] [stdout] | [INFO] [stdout] 249 | area_safe(&pa,&pc,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | area_safe(&pa,&pc,&pd) && [INFO] [stdout] | ^^^ help: change this to: `pd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:250:19 [INFO] [stdout] | [INFO] [stdout] 250 | area_safe(&pb,&pd,&pc) [INFO] [stdout] | ^^^ help: change this to: `pb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:250:23 [INFO] [stdout] | [INFO] [stdout] 250 | area_safe(&pb,&pd,&pc) [INFO] [stdout] | ^^^ help: change this to: `pd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mesh_processing/remesh.rs:250:27 [INFO] [stdout] | [INFO] [stdout] 250 | area_safe(&pb,&pd,&pc) [INFO] [stdout] | ^^^ help: change this to: `pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/mesh_processing/remesh.rs:258:9 [INFO] [stdout] | [INFO] [stdout] 258 | / let mut list = Vec::new(); [INFO] [stdout] 259 | | list.reserve(self.half_edges.len()/3); [INFO] [stdout] | |______________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut list = Vec::with_capacity(self.half_edges.len()/3);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/mesh_processing/remesh.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | / let mut candidates = Vec::new(); [INFO] [stdout] 315 | | candidates.reserve(self.half_edges.len()/4); [INFO] [stdout] | |____________________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut candidates = Vec::with_capacity(self.half_edges.len()/4);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/mesh_processing/remesh.rs:348:18 [INFO] [stdout] | [INFO] [stdout] 348 | (&(*p0) + &(*p1)).as_vector().scale(&T::from_num_den(1,2)).0 [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `p0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/mesh_processing/remesh.rs:348:27 [INFO] [stdout] | [INFO] [stdout] 348 | (&(*p0) + &(*p1)).as_vector().scale(&T::from_num_den(1,2)).0 [INFO] [stdout] | ^^^^^^ help: if you would like to reborrow, try removing `&*`: `p1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `add` can be confused for the standard trait method `std::ops::Add::add` [INFO] [stdout] --> src/numeric/ball.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn add(self, o: Self) -> Self { [INFO] [stdout] 66 | | let (s, e) = two_sum(self.m, o.m); [INFO] [stdout] 67 | | Ball { [INFO] [stdout] 68 | | m: s, [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Add` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `sub` can be confused for the standard trait method `std::ops::Sub::sub` [INFO] [stdout] --> src/numeric/ball.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / pub fn sub(self, o: Self) -> Self { [INFO] [stdout] 74 | | self.add(Ball { m: -o.m, r: o.r }) [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Sub` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `neg` can be confused for the standard trait method `std::ops::Neg::neg` [INFO] [stdout] --> src/numeric/ball.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / pub fn neg(self) -> Self { [INFO] [stdout] 78 | | Ball { [INFO] [stdout] 79 | | m: -self.m, [INFO] [stdout] 80 | | r: self.r, [INFO] [stdout] 81 | | } [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Neg` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mul` can be confused for the standard trait method `std::ops::Mul::mul` [INFO] [stdout] --> src/numeric/ball.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | / pub fn mul(self, o: Self) -> Self { [INFO] [stdout] 86 | | let (p, e) = two_prod(self.m, o.m); [INFO] [stdout] 87 | | Ball { [INFO] [stdout] 88 | | m: p, [INFO] [stdout] ... | [INFO] [stdout] 95 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Mul` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `div` can be confused for the standard trait method `std::ops::Div::div` [INFO] [stdout] --> src/numeric/ball.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | / pub fn div(self, o: Self) -> Self { [INFO] [stdout] 110 | | self.mul(o.recip()) [INFO] [stdout] 111 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::ops::Div` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_f64.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return Self(EPS); [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] 56 - return Self(EPS); [INFO] [stdout] 56 + Self(EPS) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_f64.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | return (self.0 - other.0).abs() < EPS; [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] 103 - return (self.0 - other.0).abs() < EPS; [INFO] [stdout] 103 + (self.0 - other.0).abs() < EPS [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:125:6 [INFO] [stdout] | [INFO] [stdout] 125 | impl<'a, 'b> Add<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 125 - impl<'a, 'b> Add<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 125 + impl<'b> Add<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:143:6 [INFO] [stdout] | [INFO] [stdout] 143 | impl<'a, 'b> Sub<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 143 - impl<'a, 'b> Sub<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 143 + impl<'b> Sub<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 148 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:161:6 [INFO] [stdout] | [INFO] [stdout] 161 | impl<'a, 'b> Mul<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 161 - impl<'a, 'b> Mul<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 161 + impl<'b> Mul<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:166:26 [INFO] [stdout] | [INFO] [stdout] 166 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:179:6 [INFO] [stdout] | [INFO] [stdout] 179 | impl<'a, 'b> Div<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 179 - impl<'a, 'b> Div<&'b CgarF64> for &'a CgarF64 { [INFO] [stdout] 179 + impl<'b> Div<&'b CgarF64> for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/numeric/cgar_f64.rs:184:26 [INFO] [stdout] | [INFO] [stdout] 184 | let mut result = self.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_f64.rs:369:6 [INFO] [stdout] | [INFO] [stdout] 369 | impl<'a> Neg for &'a CgarF64 { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 369 - impl<'a> Neg for &'a CgarF64 { [INFO] [stdout] 369 + impl Neg for &CgarF64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_rational.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | return 0.into(); // no tolerance for exact rational numbers [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] 57 - return 0.into(); // no tolerance for exact rational numbers [INFO] [stdout] 57 + 0.into()// no tolerance for exact rational numbers [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:128:6 [INFO] [stdout] | [INFO] [stdout] 128 | impl<'a, 'b> Add<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 128 - impl<'a, 'b> Add<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 128 + impl<'b> Add<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | impl<'a, 'b> Sub<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 146 - impl<'a, 'b> Sub<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 146 + impl<'b> Sub<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:164:6 [INFO] [stdout] | [INFO] [stdout] 164 | impl<'a, 'b> Mul<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 164 - impl<'a, 'b> Mul<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 164 + impl<'b> Mul<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:182:6 [INFO] [stdout] | [INFO] [stdout] 182 | impl<'a, 'b> Div<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 182 - impl<'a, 'b> Div<&'b CgarRational> for &'a CgarRational { [INFO] [stdout] 182 + impl<'b> Div<&'b CgarRational> for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/numeric/cgar_rational.rs:289:9 [INFO] [stdout] | [INFO] [stdout] 289 | return self.clone(); [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] 289 - return self.clone(); [INFO] [stdout] 289 + self.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/cgar_rational.rs:368:6 [INFO] [stdout] | [INFO] [stdout] 368 | impl<'a> Neg for &'a CgarRational { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 368 - impl<'a> Neg for &'a CgarRational { [INFO] [stdout] 368 + impl Neg for &CgarRational { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/numeric/lazy_exact.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | /// Returns -1, 0, or +1. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 110 | /// Returns -1, 0, or +1. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::filter` [INFO] [stdout] --> src/numeric/lazy_exact.rs:358:17 [INFO] [stdout] | [INFO] [stdout] 358 | / if let Some(v) = e.to_f64() { [INFO] [stdout] 359 | | // accept only if round-trip is exact (dyadic) [INFO] [stdout] 360 | | if CgarRational::from(v) == **e { [INFO] [stdout] 361 | | Some(v) [INFO] [stdout] ... | [INFO] [stdout] 366 | | None [INFO] [stdout] 367 | | } [INFO] [stdout] | |_________________^ help: try: `e.to_f64().filter(|&v| CgarRational::from(v) == **e)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter [INFO] [stdout] = note: `#[warn(clippy::manual_filter)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/numeric/lazy_exact.rs:587:17 [INFO] [stdout] | [INFO] [stdout] 587 | / if b.is_exact_zero() { [INFO] [stdout] 588 | | return a.clone().0.kind.clone(); [INFO] [stdout] 589 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 586 ~ Sub(a, b) [INFO] [stdout] 587 ~ if b.is_exact_zero() => { [INFO] [stdout] 588 | return a.clone().0.kind.clone(); [INFO] [stdout] 589 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/numeric/lazy_exact.rs:611:17 [INFO] [stdout] | [INFO] [stdout] 611 | / if x.is_exact_zero() { [INFO] [stdout] 612 | | return Kind::LeafExact(Arc::new(CgarRational::from(0))); [INFO] [stdout] 613 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 610 ~ Neg(x) [INFO] [stdout] 611 ~ if x.is_exact_zero() => { [INFO] [stdout] 612 | return Kind::LeafExact(Arc::new(CgarRational::from(0))); [INFO] [stdout] 613 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:688:6 [INFO] [stdout] | [INFO] [stdout] 688 | impl<'a, 'b> Add<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 688 - impl<'a, 'b> Add<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 688 + impl<'b> Add<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:702:6 [INFO] [stdout] | [INFO] [stdout] 702 | impl<'a, 'b> Sub<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 702 - impl<'a, 'b> Sub<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 702 + impl<'b> Sub<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:716:6 [INFO] [stdout] | [INFO] [stdout] 716 | impl<'a, 'b> Mul<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 716 - impl<'a, 'b> Mul<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 716 + impl<'b> Mul<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:730:6 [INFO] [stdout] | [INFO] [stdout] 730 | impl<'a, 'b> Div<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 730 - impl<'a, 'b> Div<&'b LazyExact> for &'a LazyExact { [INFO] [stdout] 730 + impl<'b> Div<&'b LazyExact> for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/numeric/lazy_exact.rs:744:6 [INFO] [stdout] | [INFO] [stdout] 744 | impl<'a> Neg for &'a LazyExact { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 744 - impl<'a> Neg for &'a LazyExact { [INFO] [stdout] 744 + impl Neg for &LazyExact { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/numeric/lazy_exact.rs:898:21 [INFO] [stdout] | [INFO] [stdout] 898 | *self = &*self - &rhs; [INFO] [stdout] | ^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/numeric/lazy_exact.rs:898:30 [INFO] [stdout] | [INFO] [stdout] 898 | *self = &*self - &rhs; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:167:21 [INFO] [stdout] | [INFO] [stdout] 167 | T::from(cx.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `cx.clone()` [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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:168:21 [INFO] [stdout] | [INFO] [stdout] 168 | T::from(&(cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&(cy + &T::from_num_den(2, 1)) * &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:168:29 [INFO] [stdout] | [INFO] [stdout] 168 | T::from(&(cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:168:62 [INFO] [stdout] | [INFO] [stdout] 168 | T::from(&(cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:41 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cx - &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:55 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:66 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:72 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:80 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:170:85 [INFO] [stdout] | [INFO] [stdout] 170 | Point2::::from_vals([T::from(cx - &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:41 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cx + &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:55 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:66 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:72 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:80 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^^^^-- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:171:85 [INFO] [stdout] | [INFO] [stdout] 171 | Point2::::from_vals([T::from(cx + &(&sqrt_3 * &r)), T::from(cy - &r)]), [INFO] [stdout] | ^^ help: change this to: `r` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:258:13 [INFO] [stdout] | [INFO] [stdout] 258 | T::from(cx.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `cx.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:259:13 [INFO] [stdout] | [INFO] [stdout] 259 | T::from(&(&cy + &T::from_num_den(2, 1)) * &r), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&(&cy + &T::from_num_den(2, 1)) * &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:261:48 [INFO] [stdout] | [INFO] [stdout] 261 | let p_super1 = Point2::::from_vals([T::from(&cx - &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cx - &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:261:80 [INFO] [stdout] | [INFO] [stdout] 261 | let p_super1 = Point2::::from_vals([T::from(&cx - &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:262:48 [INFO] [stdout] | [INFO] [stdout] 262 | let p_super2 = Point2::::from_vals([T::from(&cx + &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cx + &(&sqrt_3 * &r))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `T` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:262:80 [INFO] [stdout] | [INFO] [stdout] 262 | let p_super2 = Point2::::from_vals([T::from(&cx + &(&sqrt_3 * &r)), T::from(&cy - &r)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `T::from()`: `(&cy - &r)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `inc.get(0)` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:517:36 [INFO] [stdout] | [INFO] [stdout] 517 | if let Some(&ti) = inc.get(0) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `inc.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:583:21 [INFO] [stdout] | [INFO] [stdout] 583 | / if !constrained.contains(&cross_e) { [INFO] [stdout] 584 | | if let Some(new_e) = self.flip_shared_edge_with_adj( [INFO] [stdout] 585 | | cross_e, [INFO] [stdout] 586 | | adj.edge2tris[&cross_e][0], [INFO] [stdout] ... | [INFO] [stdout] 600 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 583 ~ if !constrained.contains(&cross_e) [INFO] [stdout] 584 ~ && let Some(new_e) = self.flip_shared_edge_with_adj( [INFO] [stdout] 585 | cross_e, [INFO] [stdout] ... [INFO] [stdout] 598 | continue; [INFO] [stdout] 599 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:695:20 [INFO] [stdout] | [INFO] [stdout] 695 | if best_score.as_ref().map_or(true, |bs| score > *bs) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 695 - if best_score.as_ref().map_or(true, |bs| score > *bs) { [INFO] [stdout] 695 + if best_score.as_ref().is_none_or(|bs| score > *bs) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:895:1 [INFO] [stdout] | [INFO] [stdout] 895 | / fn exit_edge_fast_f64( [INFO] [stdout] 896 | | points: &[Point2], [INFO] [stdout] 897 | | adj: &Adj, [INFO] [stdout] 898 | | tris: &[Triangle], [INFO] [stdout] ... | [INFO] [stdout] 903 | | by: f64, [INFO] [stdout] 904 | | ) -> Option<(Edge, Option)> { [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: this `map_or` can be simplified [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1042:24 [INFO] [stdout] | [INFO] [stdout] 1042 | if best.as_ref().map_or(true, |(_, p)| proj > *p) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 1042 - if best.as_ref().map_or(true, |(_, p)| proj > *p) { [INFO] [stdout] 1042 + if best.as_ref().is_none_or(|(_, p)| proj > *p) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is used to index `pts` [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1163:14 [INFO] [stdout] | [INFO] [stdout] 1163 | for k in 0..pts.len() { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1163 - for k in 0..pts.len() { [INFO] [stdout] 1163 + for (k, ) in pts.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1520:16 [INFO] [stdout] | [INFO] [stdout] 1520 | if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 1520 - if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] 1520 + if best.as_ref().is_none_or(|&(_, ref s)| *score > *s) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/operations/triangulation/delaunay.rs:1520:44 [INFO] [stdout] | [INFO] [stdout] 1520 | if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 1520 - if best.as_ref().map_or(true, |&(_, ref s)| *score > *s) { [INFO] [stdout] 1520 + if best.as_ref().map_or(true, |(_, s)| *score > *s) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> tests/test_tri_tri.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use std::cmp::Ordering; [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 imports: `Point3`, `numeric::cgar_f64::CgarF64`, `spatial_element::SpatialElement`, and `tri_tri_intersect::tri_tri_intersection` [INFO] [stdout] --> tests/test_tri_tri.rs:26:16 [INFO] [stdout] | [INFO] [stdout] 26 | geometry::{Point3, spatial_element::SpatialElement, tri_tri_intersect::tri_tri_intersection}, [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | numeric::cgar_f64::CgarF64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `vector::Vector` [INFO] [stdout] --> tests/test_edge_collapse.rs:4:69 [INFO] [stdout] | [INFO] [stdout] 4 | use cgar::geometry::{point::Point, spatial_element::SpatialElement, vector::Vector}; [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: `CollapsePlan` [INFO] [stdout] --> tests/test_edge_collapse.rs:7:35 [INFO] [stdout] | [INFO] [stdout] 7 | edge_collapse::{CollapseOpts, CollapsePlan, CollapseReject, Midpoint, Placement}, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `io::obj::write_obj` [INFO] [stdout] --> tests/test_topology.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | use cgar::{geometry::spatial_element::SpatialElement, io::obj::write_obj}; [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 imports: `Point2`, `Point3`, `Segment2`, `Segment3`, `SegmentOps`, and `point::PointOps` [INFO] [stdout] --> tests/test_geometry.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | Point2, Point3, Segment2, Vector2, Vector3, [INFO] [stdout] | ^^^^^^ ^^^^^^ ^^^^^^^^ [INFO] [stdout] 26 | point::PointOps, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | segment::{Segment3, SegmentOps}, [INFO] [stdout] | ^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> tests/test_topology.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | let mut s0: AHashSet<_> = pair [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> tests/test_topology.rs:228:9 [INFO] [stdout] | [INFO] [stdout] 228 | let mut s1: AHashSet<_> = pair [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> tests/test_edge_collapse.rs:276:5 [INFO] [stdout] | [INFO] [stdout] 276 | opts.forbid_border = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `CollapseOpts:: { forbid_border: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/test_edge_collapse.rs:275:5 [INFO] [stdout] | [INFO] [stdout] 275 | let mut opts = CollapseOpts::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> tests/test_edge_collapse.rs:290:5 [INFO] [stdout] | [INFO] [stdout] 290 | opts.forbid_border = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `CollapseOpts:: { forbid_border: false, forbid_normal_flip: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/test_edge_collapse.rs:289:5 [INFO] [stdout] | [INFO] [stdout] 289 | let mut opts = CollapseOpts::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_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] --> tests/test_edge_collapse.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | / match result { [INFO] [stdout] 299 | | Err(CollapseReject::BorderForbidden) => { [INFO] [stdout] 300 | | panic!("Should not reject for border when forbid_border = false"); [INFO] [stdout] ... | [INFO] [stdout] 303 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [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] help: try [INFO] [stdout] | [INFO] [stdout] 298 ~ if let Err(CollapseReject::BorderForbidden) = result { [INFO] [stdout] 299 + panic!("Should not reject for border when forbid_border = false"); [INFO] [stdout] 300 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> tests/test_edge_collapse.rs:331:5 [INFO] [stdout] | [INFO] [stdout] 331 | opts.area_eps2 = CgarF64::from(1e-15); // Very strict area threshold [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `CollapseOpts:: { area_eps2: CgarF64::from(1e-15), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/test_edge_collapse.rs:330:5 [INFO] [stdout] | [INFO] [stdout] 330 | let mut opts = CollapseOpts::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> tests/test_edge_collapse.rs:378:5 [INFO] [stdout] | [INFO] [stdout] 378 | opts.forbid_normal_flip = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `CollapseOpts:: { forbid_normal_flip: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/test_edge_collapse.rs:377:5 [INFO] [stdout] | [INFO] [stdout] 377 | let mut opts = CollapseOpts::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> tests/test_mesh.rs:63:26 [INFO] [stdout] | [INFO] [stdout] 63 | assert_eq!(he1.prev, face.half_edge + 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `face.half_edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> tests/test_mesh.rs:104:26 [INFO] [stdout] | [INFO] [stdout] 104 | assert_eq!(he1.prev, face.half_edge + 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `face.half_edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> tests/test_mesh.rs:136:26 [INFO] [stdout] | [INFO] [stdout] 136 | assert_eq!(he1.prev, face.half_edge + 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `face.half_edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> tests/test_mesh.rs:168:26 [INFO] [stdout] | [INFO] [stdout] 168 | assert_eq!(he1.prev, face.half_edge + 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `face.half_edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mesh.rs:992:13 [INFO] [stdout] | [INFO] [stdout] 992 | assert!(mesh.faces.len() > 0, "Mesh should have faces"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!mesh.faces.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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4m 41s [INFO] running `Command { std: "docker" "inspect" "f656b3fb9b7817a628984b3d3584f75c07a559a9d721c22c2323476922ae53cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f656b3fb9b7817a628984b3d3584f75c07a559a9d721c22c2323476922ae53cf", kill_on_drop: false }` [INFO] [stdout] f656b3fb9b7817a628984b3d3584f75c07a559a9d721c22c2323476922ae53cf