[INFO] cloning repository https://github.com/lorenzifrancesco/photopropulsion [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lorenzifrancesco/photopropulsion" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Florenzifrancesco%2Fphotopropulsion", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Florenzifrancesco%2Fphotopropulsion'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d98eb72eebaacd69bd7cb648111a9046c5a2dbf9 [INFO] linting lorenzifrancesco/photopropulsion against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Florenzifrancesco%2Fphotopropulsion" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lorenzifrancesco/photopropulsion [INFO] finished tweaking git repo https://github.com/lorenzifrancesco/photopropulsion [INFO] tweaked toml for git repo https://github.com/lorenzifrancesco/photopropulsion written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lorenzifrancesco/photopropulsion 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/lorenzifrancesco/photopropulsion 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded roots v0.0.8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 9f2623e73db72b0dcd3f0881ed83371fd8fad244c60d5a6d14666a11efa68b28 [INFO] running `Command { std: "docker" "start" "-a" "9f2623e73db72b0dcd3f0881ed83371fd8fad244c60d5a6d14666a11efa68b28", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9f2623e73db72b0dcd3f0881ed83371fd8fad244c60d5a6d14666a11efa68b28", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9f2623e73db72b0dcd3f0881ed83371fd8fad244c60d5a6d14666a11efa68b28", kill_on_drop: false }` [INFO] [stdout] 9f2623e73db72b0dcd3f0881ed83371fd8fad244c60d5a6d14666a11efa68b28 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 8f88a1cabe26c1e0caa8c3d251100333a1fd9685f3f5116f5974c5222151e55c [INFO] running `Command { std: "docker" "start" "-a" "8f88a1cabe26c1e0caa8c3d251100333a1fd9685f3f5116f5974c5222151e55c", kill_on_drop: false }` [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Compiling time-core v0.1.4 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Checking num_threads v0.1.7 [INFO] [stderr] Checking winnow v0.7.10 [INFO] [stderr] Checking toml_write v0.1.1 [INFO] [stderr] Checking csv-core v0.1.12 [INFO] [stderr] Checking colored v2.2.0 [INFO] [stderr] Checking jiff v0.2.14 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking roots v0.0.8 [INFO] [stderr] Compiling time-macros v0.2.22 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Checking simple_logger v5.0.0 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking env_filter v0.1.3 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking toml_datetime v0.6.9 [INFO] [stderr] Checking serde_spanned v0.6.8 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Checking toml_edit v0.22.26 [INFO] [stderr] Checking toml v0.8.22 [INFO] [stderr] Checking photopropulsion v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use simple_logger; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use simple_logger; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/io.rs:6:46 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn save_results_to_csv(output: &Path, y: &Vec<(f64, f64, f64, f64, f64)>) { [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] 6 - pub fn save_results_to_csv(output: &Path, y: &Vec<(f64, f64, f64, f64, f64)>) { [INFO] [stdout] 6 + pub fn save_results_to_csv(output: &Path, y: &[(f64, f64, f64, f64, f64)]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `y` [INFO] [stdout] --> src/io.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | for i in 0..steps { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 16 - for i in 0..steps { [INFO] [stdout] 16 + for in y.iter().take(steps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `row` [INFO] [stdout] --> src/io.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | for j in 0..n_frequencies { [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] 42 - for j in 0..n_frequencies { [INFO] [stdout] 42 + for (j, ) in row.iter_mut().enumerate().take(n_frequencies) { [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/io.rs:52:58 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn save_spectral_components_to_csv(output: &Path, y: &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] 52 - pub fn save_spectral_components_to_csv(output: &Path, y: &mut Vec>) { [INFO] [stdout] 52 + pub fn save_spectral_components_to_csv(output: &Path, y: &mut [Vec<(f64, f64)>]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `y` [INFO] [stdout] --> src/io.rs:57:10 [INFO] [stdout] | [INFO] [stdout] 57 | for i in 0..y.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] 57 - for i in 0..y.len() { [INFO] [stdout] 57 + for in &mut y { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `y` [INFO] [stdout] --> src/io.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | for i in 0..n_steps { [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] 69 - for i in 0..n_steps { [INFO] [stdout] 69 + for in y.iter().take(n_steps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/io.rs:105:48 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn linear_interpolator(file_path: &str) -> Result f64>, 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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/io.rs:157:75 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn step_interpolator(file_path: &str, threshold: f64, fading: f64) -> Result f64>, 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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/io.rs:174:45 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn constant_interpolator(value: f64) -> Result f64>, 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] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | alpha1: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | alpha2: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/solver.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 67 | if !(idx >= power_spectrum.len()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(idx < power_spectrum.len())` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | power_spectrum: &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] 49 - power_spectrum: &Vec>, [INFO] [stdout] 49 + power_spectrum: &[Vec<(f64, f64)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/solver.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let reflected_spectrum: Vec<(f64, f64)>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `reflected_spectrum` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 66 ~ [INFO] [stdout] 67 ~ let reflected_spectrum: Vec<(f64, f64)> = if !(idx >= power_spectrum.len()) { [INFO] [stdout] 68 ~ power_spectrum[idx].clone() [INFO] [stdout] 69 | } else { [INFO] [stdout] 70 ~ power_spectrum [INFO] [stdout] 71 | .last() [INFO] [stdout] 72 | .expect("power_spectrum has no last!") [INFO] [stdout] 73 ~ .clone() [INFO] [stdout] 74 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | alpha1: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | absor1: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/solver.rs:128:26 [INFO] [stdout] | [INFO] [stdout] 128 | pub fn get_spectrum_past<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 129 | power_spectrum: &'a Vec>, [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] 128 ~ pub fn get_spectrum_past( [INFO] [stdout] 129 ~ power_spectrum: &Vec>, [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/solver.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | power_spectrum: &'a 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] 129 - power_spectrum: &'a Vec>, [INFO] [stdout] 129 + power_spectrum: &'a [Vec], [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/solver.rs:142:27 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn get_delta(history: &Vec<(f64, f64, f64, f64)>, _t: f64) -> f64 { [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] 142 - pub fn get_delta(history: &Vec<(f64, f64, f64, f64)>, _t: f64) -> f64 { [INFO] [stdout] 142 + pub fn get_delta(history: &[(f64, f64, f64, f64)], _t: f64) -> f64 { [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/solver.rs:148:23 [INFO] [stdout] | [INFO] [stdout] 148 | fn t_segment(history: &Vec<(f64, f64, f64, f64)>, t: f64) -> (usize, usize) { [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] 148 - fn t_segment(history: &Vec<(f64, f64, f64, f64)>, t: f64) -> (usize, usize) { [INFO] [stdout] 148 + fn t_segment(history: &[(f64, f64, f64, f64)], t: f64) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/thermal.rs:96:1 [INFO] [stdout] | [INFO] [stdout] 96 | / fn find_temperature_root( [INFO] [stdout] 97 | | p_absorbed: f64, [INFO] [stdout] 98 | | emissivity_fn: &F, [INFO] [stdout] 99 | | coefficient: f64, [INFO] [stdout] ... | [INFO] [stdout] 107 | | where [INFO] [stdout] 108 | | F: Fn(f64) -> f64, [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/thermal.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | / match find_root_brent(t_min, t_max, &residual, convergency_trait) { [INFO] [stdout] 117 | | Ok(root) => Some(root), [INFO] [stdout] 118 | | Err(_) => None, [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ help: replace with: `find_root_brent(t_min, t_max, &residual, convergency_trait).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/thermal.rs:155:1 [INFO] [stdout] | [INFO] [stdout] 155 | / pub fn solve_temperature( [INFO] [stdout] 156 | | p_absorbed: f64, [INFO] [stdout] 157 | | diameter: f64, [INFO] [stdout] 158 | | emissivity_fn: &F, [INFO] [stdout] ... | [INFO] [stdout] 165 | | where [INFO] [stdout] 166 | | F: Fn(f64) -> f64, [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/thermal.rs:199:1 [INFO] [stdout] | [INFO] [stdout] 199 | / pub fn step_temperature_euler( [INFO] [stdout] 200 | | p_absorbed: f64, [INFO] [stdout] 201 | | emissivity_fn: &F, [INFO] [stdout] 202 | | coefficient: f64, [INFO] [stdout] ... | [INFO] [stdout] 210 | | where [INFO] [stdout] 211 | | F: Fn(f64) -> f64 { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/thermal.rs:222:5 [INFO] [stdout] | [INFO] [stdout] 222 | return Some(new_temperature) [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] 222 - return Some(new_temperature) [INFO] [stdout] 222 + Some(new_temperature) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | &("input/reflectivity/freq/abs2_step_f.csv"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/abs2_step_f.csv")` [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/main.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | &("input/reflectivity/freq/S_step_f.csv"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/S_step_f.csv")` [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/main.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | &("input/reflectivity/freq/DE_step_f.csv"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/DE_step_f.csv")` [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/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | &("input/reflectivity/freq/abs2_extended_f.csv")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/abs2_extended_f.csv")` [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/main.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | &("input/reflectivity/freq/FLAT_f.csv")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/FLAT_f.csv")` [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/main.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | &("input/reflectivity/freq/DE_f.csv")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/DE_f.csv")` [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/main.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / if mode == "delay" { [INFO] [stdout] 106 | | if !(t==0.0) { [INFO] [stdout] 107 | | let p_past = get_p_past(&history, t); [INFO] [stdout] 108 | | delta = get_delta(&history, t); [INFO] [stdout] ... | [INFO] [stdout] 165 | | } [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] 105 ~ if mode == "delay" [INFO] [stdout] 106 ~ && !(t==0.0) { [INFO] [stdout] 107 | let p_past = get_p_past(&history, t); [INFO] [stdout] ... [INFO] [stdout] 163 | } [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:126:54 [INFO] [stdout] | [INFO] [stdout] 126 | let tmp = get_thrust_and_thermal_power(&power_spectrum.last().expect("power_spectrum has no last!"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `power_spectrum.last().expect("power_spectrum has no last!")` [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 borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | output.push(&file); [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` 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/io.rs:6:46 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn save_results_to_csv(output: &Path, y: &Vec<(f64, f64, f64, f64, f64)>) { [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] 6 - pub fn save_results_to_csv(output: &Path, y: &Vec<(f64, f64, f64, f64, f64)>) { [INFO] [stdout] 6 + pub fn save_results_to_csv(output: &Path, y: &[(f64, f64, f64, f64, f64)]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `y` [INFO] [stdout] --> src/io.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | for i in 0..steps { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 16 - for i in 0..steps { [INFO] [stdout] 16 + for in y.iter().take(steps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `row` [INFO] [stdout] --> src/io.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | for j in 0..n_frequencies { [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] 42 - for j in 0..n_frequencies { [INFO] [stdout] 42 + for (j, ) in row.iter_mut().enumerate().take(n_frequencies) { [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/io.rs:52:58 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn save_spectral_components_to_csv(output: &Path, y: &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] 52 - pub fn save_spectral_components_to_csv(output: &Path, y: &mut Vec>) { [INFO] [stdout] 52 + pub fn save_spectral_components_to_csv(output: &Path, y: &mut [Vec<(f64, f64)>]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `y` [INFO] [stdout] --> src/io.rs:57:10 [INFO] [stdout] | [INFO] [stdout] 57 | for i in 0..y.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] 57 - for i in 0..y.len() { [INFO] [stdout] 57 + for in &mut y { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `y` [INFO] [stdout] --> src/io.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | for i in 0..n_steps { [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] 69 - for i in 0..n_steps { [INFO] [stdout] 69 + for in y.iter().take(n_steps) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/io.rs:105:48 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn linear_interpolator(file_path: &str) -> Result f64>, 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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/io.rs:157:75 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn step_interpolator(file_path: &str, threshold: f64, fading: f64) -> Result f64>, 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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/io.rs:174:45 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn constant_interpolator(value: f64) -> Result f64>, 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] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | alpha1: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | alpha2: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/solver.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 67 | if !(idx >= power_spectrum.len()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(idx < power_spectrum.len())` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solver.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | power_spectrum: &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] 49 - power_spectrum: &Vec>, [INFO] [stdout] 49 + power_spectrum: &[Vec<(f64, f64)>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/solver.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let reflected_spectrum: Vec<(f64, f64)>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `reflected_spectrum` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 66 ~ [INFO] [stdout] 67 ~ let reflected_spectrum: Vec<(f64, f64)> = if !(idx >= power_spectrum.len()) { [INFO] [stdout] 68 ~ power_spectrum[idx].clone() [INFO] [stdout] 69 | } else { [INFO] [stdout] 70 ~ power_spectrum [INFO] [stdout] 71 | .last() [INFO] [stdout] 72 | .expect("power_spectrum has no last!") [INFO] [stdout] 73 ~ .clone() [INFO] [stdout] 74 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | alpha1: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/solver.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | absor1: &Box f64>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn Fn(f64) -> f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/solver.rs:128:26 [INFO] [stdout] | [INFO] [stdout] 128 | pub fn get_spectrum_past<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 129 | power_spectrum: &'a Vec>, [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] 128 ~ pub fn get_spectrum_past( [INFO] [stdout] 129 ~ power_spectrum: &Vec>, [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/solver.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | power_spectrum: &'a 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] 129 - power_spectrum: &'a Vec>, [INFO] [stdout] 129 + power_spectrum: &'a [Vec], [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/solver.rs:142:27 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn get_delta(history: &Vec<(f64, f64, f64, f64)>, _t: f64) -> f64 { [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] 142 - pub fn get_delta(history: &Vec<(f64, f64, f64, f64)>, _t: f64) -> f64 { [INFO] [stdout] 142 + pub fn get_delta(history: &[(f64, f64, f64, f64)], _t: f64) -> f64 { [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/solver.rs:148:23 [INFO] [stdout] | [INFO] [stdout] 148 | fn t_segment(history: &Vec<(f64, f64, f64, f64)>, t: f64) -> (usize, usize) { [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] 148 - fn t_segment(history: &Vec<(f64, f64, f64, f64)>, t: f64) -> (usize, usize) { [INFO] [stdout] 148 + fn t_segment(history: &[(f64, f64, f64, f64)], t: f64) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/thermal.rs:96:1 [INFO] [stdout] | [INFO] [stdout] 96 | / fn find_temperature_root( [INFO] [stdout] 97 | | p_absorbed: f64, [INFO] [stdout] 98 | | emissivity_fn: &F, [INFO] [stdout] 99 | | coefficient: f64, [INFO] [stdout] ... | [INFO] [stdout] 107 | | where [INFO] [stdout] 108 | | F: Fn(f64) -> f64, [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/thermal.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | / match find_root_brent(t_min, t_max, &residual, convergency_trait) { [INFO] [stdout] 117 | | Ok(root) => Some(root), [INFO] [stdout] 118 | | Err(_) => None, [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ help: replace with: `find_root_brent(t_min, t_max, &residual, convergency_trait).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/thermal.rs:155:1 [INFO] [stdout] | [INFO] [stdout] 155 | / pub fn solve_temperature( [INFO] [stdout] 156 | | p_absorbed: f64, [INFO] [stdout] 157 | | diameter: f64, [INFO] [stdout] 158 | | emissivity_fn: &F, [INFO] [stdout] ... | [INFO] [stdout] 165 | | where [INFO] [stdout] 166 | | F: Fn(f64) -> f64, [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/thermal.rs:199:1 [INFO] [stdout] | [INFO] [stdout] 199 | / pub fn step_temperature_euler( [INFO] [stdout] 200 | | p_absorbed: f64, [INFO] [stdout] 201 | | emissivity_fn: &F, [INFO] [stdout] 202 | | coefficient: f64, [INFO] [stdout] ... | [INFO] [stdout] 210 | | where [INFO] [stdout] 211 | | F: Fn(f64) -> f64 { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/thermal.rs:222:5 [INFO] [stdout] | [INFO] [stdout] 222 | return Some(new_temperature) [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] 222 - return Some(new_temperature) [INFO] [stdout] 222 + Some(new_temperature) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | &("input/reflectivity/freq/abs2_step_f.csv"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/abs2_step_f.csv")` [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/main.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | &("input/reflectivity/freq/S_step_f.csv"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/S_step_f.csv")` [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/main.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | &("input/reflectivity/freq/DE_step_f.csv"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/DE_step_f.csv")` [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/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | &("input/reflectivity/freq/abs2_extended_f.csv")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/abs2_extended_f.csv")` [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/main.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | &("input/reflectivity/freq/FLAT_f.csv")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/FLAT_f.csv")` [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/main.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | &("input/reflectivity/freq/DE_f.csv")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `("input/reflectivity/freq/DE_f.csv")` [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/main.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / if mode == "delay" { [INFO] [stdout] 106 | | if !(t==0.0) { [INFO] [stdout] 107 | | let p_past = get_p_past(&history, t); [INFO] [stdout] 108 | | delta = get_delta(&history, t); [INFO] [stdout] ... | [INFO] [stdout] 165 | | } [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] 105 ~ if mode == "delay" [INFO] [stdout] 106 ~ && !(t==0.0) { [INFO] [stdout] 107 | let p_past = get_p_past(&history, t); [INFO] [stdout] ... [INFO] [stdout] 163 | } [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:126:54 [INFO] [stdout] | [INFO] [stdout] 126 | let tmp = get_thrust_and_thermal_power(&power_spectrum.last().expect("power_spectrum has no last!"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `power_spectrum.last().expect("power_spectrum has no last!")` [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 borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:196:17 [INFO] [stdout] | [INFO] [stdout] 196 | output.push(&file); [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.97s [INFO] running `Command { std: "docker" "inspect" "8f88a1cabe26c1e0caa8c3d251100333a1fd9685f3f5116f5974c5222151e55c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8f88a1cabe26c1e0caa8c3d251100333a1fd9685f3f5116f5974c5222151e55c", kill_on_drop: false }` [INFO] [stdout] 8f88a1cabe26c1e0caa8c3d251100333a1fd9685f3f5116f5974c5222151e55c