[INFO] cloning repository https://github.com/MFraters/cpo_analyzer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/MFraters/cpo_analyzer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMFraters%2Fcpo_analyzer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMFraters%2Fcpo_analyzer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0e0bff59eae436b29143bcec25f19ea7890d9818 [INFO] linting MFraters/cpo_analyzer against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMFraters%2Fcpo_analyzer" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/MFraters/cpo_analyzer [INFO] finished tweaking git repo https://github.com/MFraters/cpo_analyzer [INFO] tweaked toml for git repo https://github.com/MFraters/cpo_analyzer written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/MFraters/cpo_analyzer on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/MFraters/cpo_analyzer 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 crossbeam-utils v0.8.1 [INFO] [stderr] Downloaded const_fn v0.4.5 [INFO] [stderr] Downloaded rayon-core v1.9.0 [INFO] [stderr] Downloaded treeline v0.1.0 [INFO] [stderr] Downloaded plotters-bitmap v0.3.6 [INFO] [stderr] Downloaded predicates-tree v1.0.2 [INFO] [stderr] Downloaded predicates-core v1.0.2 [INFO] [stderr] Downloaded pathfinder_simd v0.5.3 [INFO] [stderr] Downloaded assert_cmd v1.0.3 [INFO] [stderr] Downloaded libflate v1.0.3 [INFO] [stderr] Downloaded rle-decode-fast v1.0.1 [INFO] [stderr] Downloaded crossbeam-channel v0.5.0 [INFO] [stderr] Downloaded regex-automata v0.1.9 [INFO] [stderr] Downloaded bumpalo v3.6.0 [INFO] [stderr] Downloaded rayon v1.5.0 [INFO] [stderr] Downloaded ndarray v0.13.1 [INFO] [stderr] Downloaded font-kit v0.13.2 [INFO] [stderr] Downloaded palette v0.5.0 [INFO] [stderr] Downloaded matrixmultiply v0.2.4 [INFO] [stderr] Downloaded plotters v0.3.6 [INFO] [stderr] Downloaded predicates v1.0.7 [INFO] [stderr] Downloaded csv-core v0.1.10 [INFO] [stderr] Downloaded num-complex v0.2.4 [INFO] [stderr] Downloaded plotters-svg v0.3.6 [INFO] [stderr] Downloaded bstr v0.2.14 [INFO] [stderr] Downloaded proc-macro2 v1.0.84 [INFO] [stderr] Downloaded cstr v0.2.12 [INFO] [stderr] Downloaded yeslogic-fontconfig-sys v5.0.0 [INFO] [stderr] Downloaded plotters-backend v0.3.6 [INFO] [stderr] Downloaded crossbeam-epoch v0.9.1 [INFO] [stderr] Downloaded libflate_lz77 v1.0.0 [INFO] [stderr] Downloaded palette_derive v0.5.0 [INFO] [stderr] Downloaded siphasher v0.3.3 [INFO] [stderr] Downloaded csv v1.1.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4520dc0431307bd0f4d3a1b618a60401a5d9443eaaf56ab484f5397c312774f9 [INFO] running `Command { std: "docker" "start" "-a" "4520dc0431307bd0f4d3a1b618a60401a5d9443eaaf56ab484f5397c312774f9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4520dc0431307bd0f4d3a1b618a60401a5d9443eaaf56ab484f5397c312774f9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4520dc0431307bd0f4d3a1b618a60401a5d9443eaaf56ab484f5397c312774f9", kill_on_drop: false }` [INFO] [stdout] 4520dc0431307bd0f4d3a1b618a60401a5d9443eaaf56ab484f5397c312774f9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ae6861c377edeec83a90458dfd7ba75ae4b4b0877b0365fb2149be3cac0f179f [INFO] running `Command { std: "docker" "start" "-a" "ae6861c377edeec83a90458dfd7ba75ae4b4b0877b0365fb2149be3cac0f179f", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling proc-macro2 v1.0.84 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling syn v1.0.60 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling crossbeam-utils v0.8.1 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling version_check v0.9.2 [INFO] [stderr] Compiling semver v1.0.23 [INFO] [stderr] Checking byteorder v1.4.2 [INFO] [stderr] Compiling memoffset v0.6.1 [INFO] [stderr] Compiling const_fn v0.4.5 [INFO] [stderr] Compiling serde v1.0.123 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Compiling ppv-lite86 v0.2.10 [INFO] [stderr] Compiling cc v1.0.98 [INFO] [stderr] Compiling siphasher v0.3.3 [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling rustc_version v0.4.0 [INFO] [stderr] Compiling phf_shared v0.8.0 [INFO] [stderr] Checking miniz_oxide v0.7.3 [INFO] [stderr] Compiling yeslogic-fontconfig-sys v5.0.0 [INFO] [stderr] Compiling unicode-segmentation v1.7.1 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling rayon-core v1.9.0 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Checking fdeflate v0.3.4 [INFO] [stderr] Checking libloading v0.8.3 [INFO] [stderr] Checking color_quant v1.1.0 [INFO] [stderr] Checking regex-automata v0.1.9 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling pathfinder_simd v0.5.3 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling rayon v1.5.0 [INFO] [stderr] Compiling num-complex v0.2.4 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Checking weezl v0.1.8 [INFO] [stderr] Checking crossbeam-epoch v0.9.1 [INFO] [stderr] Compiling heck v0.3.2 [INFO] [stderr] Checking crossbeam-channel v0.5.0 [INFO] [stderr] Checking bytemuck v1.16.0 [INFO] [stderr] Checking jpeg-decoder v0.3.1 [INFO] [stderr] Checking dirs-sys-next v0.1.2 [INFO] [stderr] Compiling getrandom v0.1.16 [INFO] [stderr] Checking crossbeam-deque v0.8.0 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking flate2 v1.0.30 [INFO] [stderr] Checking plotters-backend v0.3.6 [INFO] [stderr] Checking unicode-width v0.1.8 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Compiling cstr v0.2.12 [INFO] [stderr] Compiling font-kit v0.13.2 [INFO] [stderr] Checking gif v0.12.0 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking dirs-next v2.0.0 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking walkdir v2.3.1 [INFO] [stderr] Compiling rand_core v0.5.1 [INFO] [stderr] Compiling ndarray v0.13.1 [INFO] [stderr] Checking vec_map v0.8.2 [INFO] [stderr] Compiling serde_derive v1.0.123 [INFO] [stderr] Checking strsim v0.8.0 [INFO] [stderr] Checking float-ord v0.3.2 [INFO] [stderr] Compiling rand_chacha v0.2.2 [INFO] [stderr] Compiling rand_pcg v0.2.1 [INFO] [stderr] Checking ansi_term v0.11.0 [INFO] [stderr] Checking iana-time-zone v0.1.60 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking bitflags v2.5.0 [INFO] [stderr] Checking matrixmultiply v0.2.4 [INFO] [stderr] Checking phf v0.8.0 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking png v0.17.13 [INFO] [stderr] Checking approx v0.3.2 [INFO] [stderr] Checking pathfinder_geometry v0.5.1 [INFO] [stderr] Checking clap v2.33.3 [INFO] [stderr] Checking plotters-svg v0.3.6 [INFO] [stderr] Checking csv-core v0.1.10 [INFO] [stderr] Checking itoa v0.4.7 [INFO] [stderr] Checking libflate_lz77 v1.0.0 [INFO] [stderr] Compiling doc-comment v0.3.3 [INFO] [stderr] Checking predicates-core v1.0.2 [INFO] [stderr] Checking rle-decode-fast v1.0.1 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Compiling rand v0.7.3 [INFO] [stderr] Checking treeline v0.1.0 [INFO] [stderr] Checking libflate v1.0.3 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Checking wait-timeout v0.2.0 [INFO] [stderr] Checking predicates-tree v1.0.2 [INFO] [stderr] Checking predicates v1.0.7 [INFO] [stderr] Compiling freetype-sys v0.20.1 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Compiling phf_generator v0.8.0 [INFO] [stderr] Compiling phf_codegen v0.8.0 [INFO] [stderr] Compiling palette v0.5.0 [INFO] [stderr] Checking bstr v0.2.14 [INFO] [stderr] Checking serde_bytes v0.11.5 [INFO] [stderr] Checking toml v0.5.8 [INFO] [stderr] Checking plotters-bitmap v0.3.6 [INFO] [stderr] Checking csv v1.1.5 [INFO] [stderr] Checking assert_cmd v1.0.3 [INFO] [stderr] Checking plotters v0.3.6 [INFO] [stderr] Compiling palette_derive v0.5.0 [INFO] [stderr] Compiling strum_macros v0.20.1 [INFO] [stderr] Compiling structopt-derive v0.4.14 [INFO] [stderr] Checking strum v0.20.0 [INFO] [stderr] Checking structopt v0.3.21 [INFO] [stderr] Checking cpo_analyzer v0.2.0-pre (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pole_figures/lambert.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | x_plane: x_plane, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `x_plane` [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: redundant field names in struct initialization [INFO] [stdout] --> src/pole_figures/lambert.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | z_plane: z_plane, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `z_plane` [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/pole_figures/lambert.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | r_plane: r_plane, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `r_plane` [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/pole_figures/lambert.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [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/pole_figures/lambert.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/pole_figures/lambert.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | z: z, [INFO] [stdout] | ^^^^ help: replace it with: `z` [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/pole_figures/lambert.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | x_plane: x_plane, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `x_plane` [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: redundant field names in struct initialization [INFO] [stdout] --> src/pole_figures/lambert.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | z_plane: z_plane, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `z_plane` [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/pole_figures/lambert.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | r_plane: r_plane, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `r_plane` [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/pole_figures/lambert.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [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/pole_figures/lambert.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/pole_figures/lambert.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | z: z, [INFO] [stdout] | ^^^^ help: replace it with: `z` [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/lib.rs:662:41 [INFO] [stdout] | [INFO] [stdout] 662 | ... counts: counts, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `counts` [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/lib.rs:662:41 [INFO] [stdout] | [INFO] [stdout] 662 | ... counts: counts, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `counts` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/pole_figures/lambert.rs:69:73 [INFO] [stdout] | [INFO] [stdout] 69 | *a = if 1. - (x_plane * x_plane + z_plane * z_plane) / 4. > std::f64::EPSILON { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 69 - *a = if 1. - (x_plane * x_plane + z_plane * z_plane) / 4. > std::f64::EPSILON { [INFO] [stdout] 69 + *a = if 1. - (x_plane * x_plane + z_plane * z_plane) / 4. > f64::EPSILON { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pole_figures/lambert.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | x = x / &mag; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x /= &mag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pole_figures/lambert.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | y = y / &mag; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y /= &mag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pole_figures/lambert.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | z = z / &mag; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `z /= &mag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/pole_figures/lambert.rs:133:6 [INFO] [stdout] | [INFO] [stdout] 133 | ) -> Result<(Array>, Array>), Box> [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 function has too many arguments (12/7) [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn make_pole_figures( [INFO] [stdout] 37 | | small_figure: bool, [INFO] [stdout] 38 | | no_description_text: bool, [INFO] [stdout] 39 | | elastisity_header: bool, [INFO] [stdout] ... | [INFO] [stdout] 48 | | color_gradient_selection: &ColorGradient, [INFO] [stdout] 49 | | ) -> Result<(), Box> { [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | pole_figure_grid: &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] 42 - pole_figure_grid: &Vec>, [INFO] [stdout] 42 + pole_figure_grid: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:65:22 [INFO] [stdout] | [INFO] [stdout] 65 | *a = std::f64::NAN [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 65 - *a = std::f64::NAN [INFO] [stdout] 65 + *a = f64::NAN [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[f64; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:170:31 [INFO] [stdout] | [INFO] [stdout] 170 | let mut tric_sorted = tric_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tric_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:171:31 [INFO] [stdout] | [INFO] [stdout] 171 | let mut mono_sorted = mono_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `mono_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:172:31 [INFO] [stdout] | [INFO] [stdout] 172 | let mut orth_sorted = orth_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `orth_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:173:31 [INFO] [stdout] | [INFO] [stdout] 173 | let mut tetr_sorted = tetr_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tetr_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:174:31 [INFO] [stdout] | [INFO] [stdout] 174 | let mut hexa_sorted = hexa_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `hexa_unsorted` [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` has identical blocks [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:385:41 [INFO] [stdout] | [INFO] [stdout] 385 | if small_figure { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 386 | | format!("{:.2}", max_count_value) [INFO] [stdout] 387 | | } else { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:387:32 [INFO] [stdout] | [INFO] [stdout] 387 | } else { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 388 | | format!("{:.2}", max_count_value) [INFO] [stdout] 389 | | }, [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 loop variable `i` is used to index `matrix` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:408:26 [INFO] [stdout] | [INFO] [stdout] 408 | for i in 0..legend_size - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 408 - for i in 0..legend_size - 1 { [INFO] [stdout] 408 + for (i, ) in matrix.iter_mut().enumerate().take(legend_size - 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:475:46 [INFO] [stdout] | [INFO] [stdout] 475 | total_mask[[i, j]] = std::f64::NAN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 475 - total_mask[[i, j]] = std::f64::NAN; [INFO] [stdout] 475 + total_mask[[i, j]] = f64::NAN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:506:25 [INFO] [stdout] | [INFO] [stdout] 506 | format!("{}", crystal_axis_string), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `crystal_axis_string.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:515:21 [INFO] [stdout] | [INFO] [stdout] 515 | format!("{}", mineral_string), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `mineral_string.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:524:17 [INFO] [stdout] | [INFO] [stdout] 524 | format!("Z"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"Z".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:529:17 [INFO] [stdout] | [INFO] [stdout] 529 | format!("X"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"X".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:532:21 [INFO] [stdout] | [INFO] [stdout] 532 | if small_figure { 235 } else { 385 } as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if small_figure { 235 } else { 385 }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/lib.rs:162:76 [INFO] [stdout] | [INFO] [stdout] 162 | Err(why) => panic!("couldn't open {}: {}", config_file_display, why.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | / match file.read_to_string(&mut config_file_string) { [INFO] [stdout] 168 | | Err(why) => panic!("couldn't read {}: {}", config_file_display, why.to_string()), [INFO] [stdout] 169 | | Ok(_) => (), [INFO] [stdout] 170 | | } [INFO] [stdout] | |_____^ help: try: `if let Err(why) = file.read_to_string(&mut config_file_string) { panic!("couldn't read {}: {}", config_file_display, why.to_string()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/lib.rs:168:76 [INFO] [stdout] | [INFO] [stdout] 168 | Err(why) => panic!("couldn't read {}: {}", config_file_display, why.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:189:19 [INFO] [stdout] | [INFO] [stdout] 189 | while let Some(_) = line.find(" ") { [INFO] [stdout] | ----------^^^^^^^------------------ help: try: `while line.find(" ").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | / if line.find('#') != Some(0) { [INFO] [stdout] 194 | | if line.find(&pole_figure_configuration.particle_data_dir) != None { [INFO] [stdout] 195 | | data = data + &line + "\n"; [INFO] [stdout] 196 | | } [INFO] [stdout] 197 | | } [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] 193 ~ if line.find('#') != Some(0) [INFO] [stdout] 194 ~ && line.find(&pole_figure_configuration.particle_data_dir) != None { [INFO] [stdout] 195 | data = data + &line + "\n"; [INFO] [stdout] 196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lib.rs:194:16 [INFO] [stdout] | [INFO] [stdout] 194 | if line.find(&pole_figure_configuration.particle_data_dir) != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `line.find(&pole_figure_configuration.particle_data_dir).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&str>` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:211:20 [INFO] [stdout] | [INFO] [stdout] 211 | let time = record.get(1).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.get(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/lib.rs:214:21 [INFO] [stdout] | [INFO] [stdout] 214 | None => assert!(false, "Time not found"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | assert!(time_step_to_time.len() > 0,"Did not find any entries in the statistics file. This means there where no (non-comment) l... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!time_step_to_time.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:224:64 [INFO] [stdout] | [INFO] [stdout] 224 | fn get_closest_time_step(output_time: &f64, time_step_to_time: &Vec) -> u64 { [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] 224 - fn get_closest_time_step(output_time: &f64, time_step_to_time: &Vec) -> u64 { [INFO] [stdout] 224 + fn get_closest_time_step(output_time: &f64, time_step_to_time: &[f64]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:250:5 [INFO] [stdout] | [INFO] [stdout] 244 | / let time_step = if before_time_step_diff < after_time_step_diff { [INFO] [stdout] 245 | | before_time_step as u64 [INFO] [stdout] 246 | | } else { [INFO] [stdout] 247 | | after_time_step as u64 [INFO] [stdout] 248 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 249 | [INFO] [stdout] 250 | time_step [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] 244 ~ [INFO] [stdout] 245 | [INFO] [stdout] 246 ~ if before_time_step_diff < after_time_step_diff { [INFO] [stdout] 247 + before_time_step as u64 [INFO] [stdout] 248 + } else { [INFO] [stdout] 249 + after_time_step as u64 [INFO] [stdout] 250 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/lib.rs:225:60 [INFO] [stdout] | [INFO] [stdout] 225 | let after_time = time_step_to_time.iter().position(|x| x > &output_time); [INFO] [stdout] | ^^^^------------ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `output_time` [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/lib.rs:225:64 [INFO] [stdout] | [INFO] [stdout] 225 | let after_time = time_step_to_time.iter().position(|x| x > &output_time); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `output_time` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:423:28 [INFO] [stdout] | [INFO] [stdout] 423 | if !(fs::metadata(angles_file).is_ok()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(angles_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config.pole_figures` after checking its variant with `is_some` [INFO] [stdout] --> src/lib.rs:300:39 [INFO] [stdout] | [INFO] [stdout] 297 | if config.pole_figures.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = &config.pole_figures` [INFO] [stdout] ... [INFO] [stdout] 300 | cpo_dir.to_owned() + &config.pole_figures.as_ref().unwrap().time_data_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config.pole_figures` after checking its variant with `is_some` [INFO] [stdout] --> src/lib.rs:301:45 [INFO] [stdout] | [INFO] [stdout] 297 | if config.pole_figures.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = &config.pole_figures` [INFO] [stdout] ... [INFO] [stdout] 301 | let pole_figure_configuration = config.pole_figures.as_ref().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:295:42 [INFO] [stdout] | [INFO] [stdout] 295 | let cpo_dir = base_dir.clone() + &experiment_dir; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `experiment_dir` [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/lib.rs:308:55 [INFO] [stdout] | [INFO] [stdout] 308 | let time_step = get_closest_time_step(&output_time, &time_step_to_time); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `output_time` [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: `format!` in `format!` args [INFO] [stdout] --> src/lib.rs:345:43 [INFO] [stdout] | [INFO] [stdout] 345 | let angles_file = format!( [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 346 | | "{}{}-{:05}.{:04}.dat", [INFO] [stdout] 347 | | cpo_dir, [INFO] [stdout] 348 | | format!( [INFO] [stdout] ... | [INFO] [stdout] 354 | | rank_id [INFO] [stdout] 355 | | ); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lib.rs:404:66 [INFO] [stdout] | [INFO] [stdout] 404 | ... pole_figure_configuration.color_scale.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/lib.rs:411:45 [INFO] [stdout] | [INFO] [stdout] 411 | let particle_file = format!( [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 412 | | "{}{}-{:05}.{:04}.dat", [INFO] [stdout] 413 | | cpo_dir, [INFO] [stdout] 414 | | format!("{}/particles", pole_figure_configuration.particle_data_dir), [INFO] [stdout] 415 | | time_step, [INFO] [stdout] 416 | | rank_id [INFO] [stdout] 417 | | ); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib.rs:433:29 [INFO] [stdout] | [INFO] [stdout] 433 | ... rank_id = rank_id + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rank_id += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:458:53 [INFO] [stdout] | [INFO] [stdout] 458 | ... String::from_utf8_lossy(&data) [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: manual implementation of an assign operation [INFO] [stdout] --> src/lib.rs:515:29 [INFO] [stdout] | [INFO] [stdout] 515 | ... integer = integer + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `integer += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:519:28 [INFO] [stdout] | [INFO] [stdout] 519 | if particle_olivine_a_axis_vectors.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `particle_olivine_a_axis_vectors.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:520:32 [INFO] [stdout] | [INFO] [stdout] 520 | ... && particle_enstatite_a_axis_vectors.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `particle_enstatite_a_axis_vectors.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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib.rs:522:29 [INFO] [stdout] | [INFO] [stdout] 522 | ... rank_id = rank_id + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rank_id += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pole_figures/lambert.rs:69:73 [INFO] [stdout] | [INFO] [stdout] 69 | *a = if 1. - (x_plane * x_plane + z_plane * z_plane) / 4. > std::f64::EPSILON { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 69 - *a = if 1. - (x_plane * x_plane + z_plane * z_plane) / 4. > std::f64::EPSILON { [INFO] [stdout] 69 + *a = if 1. - (x_plane * x_plane + z_plane * z_plane) / 4. > f64::EPSILON { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `figure_horizontal_axis` is used as a loop counter [INFO] [stdout] --> src/lib.rs:607:25 [INFO] [stdout] | [INFO] [stdout] 607 | for axis in pole_figure_configuration.axes.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (figure_horizontal_axis, axis) in pole_figure_configuration.axes.clone().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 variable `figure_vertical_axis` is used as a loop counter [INFO] [stdout] --> src/lib.rs:609:29 [INFO] [stdout] | [INFO] [stdout] 609 | ... for mineral in pole_figure_configuration.minerals.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (figure_vertical_axis, mineral) in pole_figure_configuration.minerals.clone().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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pole_figures/lambert.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | x = x / &mag; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `x /= &mag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pole_figures/lambert.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | y = y / &mag; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `y /= &mag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pole_figures/lambert.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | z = z / &mag; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `z /= &mag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/pole_figures/lambert.rs:133:6 [INFO] [stdout] | [INFO] [stdout] 133 | ) -> Result<(Array>, Array>), Box> [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: the variable `figure_vertical_axis` is used as a loop counter [INFO] [stdout] --> src/lib.rs:672:25 [INFO] [stdout] | [INFO] [stdout] 672 | for _mineral in pole_figure_configuration.minerals.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (figure_vertical_axis, _mineral) in pole_figure_configuration.minerals.clone().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] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:771:19 [INFO] [stdout] | [INFO] [stdout] 771 | let std_dev = ((npts as f64 * (k as f64 / 2. - 1.) / (k * k)) as f64).sqrt(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((npts as f64 * (k as f64 / 2. - 1.) / (k * k)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:771:36 [INFO] [stdout] | [INFO] [stdout] 771 | let std_dev = ((npts as f64 * (k as f64 / 2. - 1.) / (k * k)) as f64).sqrt(); [INFO] [stdout] | ^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn make_pole_figures( [INFO] [stdout] 37 | | small_figure: bool, [INFO] [stdout] 38 | | no_description_text: bool, [INFO] [stdout] 39 | | elastisity_header: bool, [INFO] [stdout] ... | [INFO] [stdout] 48 | | color_gradient_selection: &ColorGradient, [INFO] [stdout] 49 | | ) -> Result<(), Box> { [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: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:780:16 [INFO] [stdout] | [INFO] [stdout] 780 | cosalpha = (k as f64) * (cosalpha - 1.); [INFO] [stdout] | ^^^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | pole_figure_grid: &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] 42 - pole_figure_grid: &Vec>, [INFO] [stdout] 42 + pole_figure_grid: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:65:22 [INFO] [stdout] | [INFO] [stdout] 65 | *a = std::f64::NAN [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 65 - *a = std::f64::NAN [INFO] [stdout] 65 + *a = f64::NAN [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[f64; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:170:31 [INFO] [stdout] | [INFO] [stdout] 170 | let mut tric_sorted = tric_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tric_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:171:31 [INFO] [stdout] | [INFO] [stdout] 171 | let mut mono_sorted = mono_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `mono_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:172:31 [INFO] [stdout] | [INFO] [stdout] 172 | let mut orth_sorted = orth_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `orth_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:173:31 [INFO] [stdout] | [INFO] [stdout] 173 | let mut tetr_sorted = tetr_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tetr_unsorted` [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; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:174:31 [INFO] [stdout] | [INFO] [stdout] 174 | let mut hexa_sorted = hexa_unsorted.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `hexa_unsorted` [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` has identical blocks [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:385:41 [INFO] [stdout] | [INFO] [stdout] 385 | if small_figure { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 386 | | format!("{:.2}", max_count_value) [INFO] [stdout] 387 | | } else { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:387:32 [INFO] [stdout] | [INFO] [stdout] 387 | } else { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 388 | | format!("{:.2}", max_count_value) [INFO] [stdout] 389 | | }, [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 loop variable `i` is used to index `matrix` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:408:26 [INFO] [stdout] | [INFO] [stdout] 408 | for i in 0..legend_size - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 408 - for i in 0..legend_size - 1 { [INFO] [stdout] 408 + for (i, ) in matrix.iter_mut().enumerate().take(legend_size - 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:475:46 [INFO] [stdout] | [INFO] [stdout] 475 | total_mask[[i, j]] = std::f64::NAN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 475 - total_mask[[i, j]] = std::f64::NAN; [INFO] [stdout] 475 + total_mask[[i, j]] = f64::NAN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:506:25 [INFO] [stdout] | [INFO] [stdout] 506 | format!("{}", crystal_axis_string), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `crystal_axis_string.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:515:21 [INFO] [stdout] | [INFO] [stdout] 515 | format!("{}", mineral_string), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `mineral_string.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:524:17 [INFO] [stdout] | [INFO] [stdout] 524 | format!("Z"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"Z".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:529:17 [INFO] [stdout] | [INFO] [stdout] 529 | format!("X"), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using `.to_string()`: `"X".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/pole_figures/make_pole_figures.rs:532:21 [INFO] [stdout] | [INFO] [stdout] 532 | if small_figure { 235 } else { 385 } as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if small_figure { 235 } else { 385 }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/lib.rs:162:76 [INFO] [stdout] | [INFO] [stdout] 162 | Err(why) => panic!("couldn't open {}: {}", config_file_display, why.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | / match file.read_to_string(&mut config_file_string) { [INFO] [stdout] 168 | | Err(why) => panic!("couldn't read {}: {}", config_file_display, why.to_string()), [INFO] [stdout] 169 | | Ok(_) => (), [INFO] [stdout] 170 | | } [INFO] [stdout] | |_____^ help: try: `if let Err(why) = file.read_to_string(&mut config_file_string) { panic!("couldn't read {}: {}", config_file_display, why.to_string()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/lib.rs:168:76 [INFO] [stdout] | [INFO] [stdout] 168 | Err(why) => panic!("couldn't read {}: {}", config_file_display, why.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:189:19 [INFO] [stdout] | [INFO] [stdout] 189 | while let Some(_) = line.find(" ") { [INFO] [stdout] | ----------^^^^^^^------------------ help: try: `while line.find(" ").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | / if line.find('#') != Some(0) { [INFO] [stdout] 194 | | if line.find(&pole_figure_configuration.particle_data_dir) != None { [INFO] [stdout] 195 | | data = data + &line + "\n"; [INFO] [stdout] 196 | | } [INFO] [stdout] 197 | | } [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] 193 ~ if line.find('#') != Some(0) [INFO] [stdout] 194 ~ && line.find(&pole_figure_configuration.particle_data_dir) != None { [INFO] [stdout] 195 | data = data + &line + "\n"; [INFO] [stdout] 196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/lib.rs:194:16 [INFO] [stdout] | [INFO] [stdout] 194 | if line.find(&pole_figure_configuration.particle_data_dir) != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `line.find(&pole_figure_configuration.particle_data_dir).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&str>` which implements the `Copy` trait [INFO] [stdout] --> src/lib.rs:211:20 [INFO] [stdout] | [INFO] [stdout] 211 | let time = record.get(1).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `record.get(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/lib.rs:214:21 [INFO] [stdout] | [INFO] [stdout] 214 | None => assert!(false, "Time not found"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | assert!(time_step_to_time.len() > 0,"Did not find any entries in the statistics file. This means there where no (non-comment) l... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!time_step_to_time.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:224:64 [INFO] [stdout] | [INFO] [stdout] 224 | fn get_closest_time_step(output_time: &f64, time_step_to_time: &Vec) -> u64 { [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] 224 - fn get_closest_time_step(output_time: &f64, time_step_to_time: &Vec) -> u64 { [INFO] [stdout] 224 + fn get_closest_time_step(output_time: &f64, time_step_to_time: &[f64]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:250:5 [INFO] [stdout] | [INFO] [stdout] 244 | / let time_step = if before_time_step_diff < after_time_step_diff { [INFO] [stdout] 245 | | before_time_step as u64 [INFO] [stdout] 246 | | } else { [INFO] [stdout] 247 | | after_time_step as u64 [INFO] [stdout] 248 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 249 | [INFO] [stdout] 250 | time_step [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] 244 ~ [INFO] [stdout] 245 | [INFO] [stdout] 246 ~ if before_time_step_diff < after_time_step_diff { [INFO] [stdout] 247 + before_time_step as u64 [INFO] [stdout] 248 + } else { [INFO] [stdout] 249 + after_time_step as u64 [INFO] [stdout] 250 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/lib.rs:225:60 [INFO] [stdout] | [INFO] [stdout] 225 | let after_time = time_step_to_time.iter().position(|x| x > &output_time); [INFO] [stdout] | ^^^^------------ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `output_time` [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/lib.rs:225:64 [INFO] [stdout] | [INFO] [stdout] 225 | let after_time = time_step_to_time.iter().position(|x| x > &output_time); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `output_time` [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 boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:423:28 [INFO] [stdout] | [INFO] [stdout] 423 | if !(fs::metadata(angles_file).is_ok()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(angles_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config.pole_figures` after checking its variant with `is_some` [INFO] [stdout] --> src/lib.rs:300:39 [INFO] [stdout] | [INFO] [stdout] 297 | if config.pole_figures.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = &config.pole_figures` [INFO] [stdout] ... [INFO] [stdout] 300 | cpo_dir.to_owned() + &config.pole_figures.as_ref().unwrap().time_data_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config.pole_figures` after checking its variant with `is_some` [INFO] [stdout] --> src/lib.rs:301:45 [INFO] [stdout] | [INFO] [stdout] 297 | if config.pole_figures.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = &config.pole_figures` [INFO] [stdout] ... [INFO] [stdout] 301 | let pole_figure_configuration = config.pole_figures.as_ref().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:295:42 [INFO] [stdout] | [INFO] [stdout] 295 | let cpo_dir = base_dir.clone() + &experiment_dir; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `experiment_dir` [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/lib.rs:308:55 [INFO] [stdout] | [INFO] [stdout] 308 | let time_step = get_closest_time_step(&output_time, &time_step_to_time); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `output_time` [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: `format!` in `format!` args [INFO] [stdout] --> src/lib.rs:345:43 [INFO] [stdout] | [INFO] [stdout] 345 | let angles_file = format!( [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 346 | | "{}{}-{:05}.{:04}.dat", [INFO] [stdout] 347 | | cpo_dir, [INFO] [stdout] 348 | | format!( [INFO] [stdout] ... | [INFO] [stdout] 354 | | rank_id [INFO] [stdout] 355 | | ); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lib.rs:404:66 [INFO] [stdout] | [INFO] [stdout] 404 | ... pole_figure_configuration.color_scale.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/lib.rs:411:45 [INFO] [stdout] | [INFO] [stdout] 411 | let particle_file = format!( [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 412 | | "{}{}-{:05}.{:04}.dat", [INFO] [stdout] 413 | | cpo_dir, [INFO] [stdout] 414 | | format!("{}/particles", pole_figure_configuration.particle_data_dir), [INFO] [stdout] 415 | | time_step, [INFO] [stdout] 416 | | rank_id [INFO] [stdout] 417 | | ); [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib.rs:433:29 [INFO] [stdout] | [INFO] [stdout] 433 | ... rank_id = rank_id + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rank_id += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:458:53 [INFO] [stdout] | [INFO] [stdout] 458 | ... String::from_utf8_lossy(&data) [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: manual implementation of an assign operation [INFO] [stdout] --> src/lib.rs:515:29 [INFO] [stdout] | [INFO] [stdout] 515 | ... integer = integer + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `integer += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:519:28 [INFO] [stdout] | [INFO] [stdout] 519 | if particle_olivine_a_axis_vectors.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `particle_olivine_a_axis_vectors.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:520:32 [INFO] [stdout] | [INFO] [stdout] 520 | ... && particle_enstatite_a_axis_vectors.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `particle_enstatite_a_axis_vectors.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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib.rs:522:29 [INFO] [stdout] | [INFO] [stdout] 522 | ... rank_id = rank_id + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rank_id += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `figure_horizontal_axis` is used as a loop counter [INFO] [stdout] --> src/lib.rs:607:25 [INFO] [stdout] | [INFO] [stdout] 607 | for axis in pole_figure_configuration.axes.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (figure_horizontal_axis, axis) in pole_figure_configuration.axes.clone().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 variable `figure_vertical_axis` is used as a loop counter [INFO] [stdout] --> src/lib.rs:609:29 [INFO] [stdout] | [INFO] [stdout] 609 | ... for mineral in pole_figure_configuration.minerals.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (figure_vertical_axis, mineral) in pole_figure_configuration.minerals.clone().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] [INFO] [stdout] [INFO] [stdout] warning: the variable `figure_vertical_axis` is used as a loop counter [INFO] [stdout] --> src/lib.rs:672:25 [INFO] [stdout] | [INFO] [stdout] 672 | for _mineral in pole_figure_configuration.minerals.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (figure_vertical_axis, _mineral) in pole_figure_configuration.minerals.clone().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] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:771:19 [INFO] [stdout] | [INFO] [stdout] 771 | let std_dev = ((npts as f64 * (k as f64 / 2. - 1.) / (k * k)) as f64).sqrt(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((npts as f64 * (k as f64 / 2. - 1.) / (k * k)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:771:36 [INFO] [stdout] | [INFO] [stdout] 771 | let std_dev = ((npts as f64 * (k as f64 / 2. - 1.) / (k * k)) as f64).sqrt(); [INFO] [stdout] | ^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:780:16 [INFO] [stdout] | [INFO] [stdout] 780 | cosalpha = (k as f64) * (cosalpha - 1.); [INFO] [stdout] | ^^^^^^^^^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 29.77s [INFO] running `Command { std: "docker" "inspect" "ae6861c377edeec83a90458dfd7ba75ae4b4b0877b0365fb2149be3cac0f179f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ae6861c377edeec83a90458dfd7ba75ae4b4b0877b0365fb2149be3cac0f179f", kill_on_drop: false }` [INFO] [stdout] ae6861c377edeec83a90458dfd7ba75ae4b4b0877b0365fb2149be3cac0f179f