[INFO] crate ta 0.1.0 is already in cache [INFO] extracting crate ta 0.1.0 into work/ex/clippy-test-run/sources/stable/reg/ta/0.1.0 [INFO] extracting crate ta 0.1.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/ta/0.1.0 [INFO] validating manifest of ta-0.1.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of ta-0.1.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing ta-0.1.0 [INFO] finished frobbing ta-0.1.0 [INFO] frobbed toml for ta-0.1.0 written to work/ex/clippy-test-run/sources/stable/reg/ta/0.1.0/Cargo.toml [INFO] started frobbing ta-0.1.0 [INFO] finished frobbing ta-0.1.0 [INFO] frobbed toml for ta-0.1.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/ta/0.1.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting ta-0.1.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/ta/0.1.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] a2addcfdaf0e96691dd9b2ad4974502400915d61abd1024948ae84ed5f4cadb9 [INFO] running `"docker" "start" "-a" "a2addcfdaf0e96691dd9b2ad4974502400915d61abd1024948ae84ed5f4cadb9"` [INFO] [stderr] Checking assert_approx_eq v1.1.0 [INFO] [stderr] Checking memchr v1.0.2 [INFO] [stderr] Checking ta v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/indicators/exponential_moving_average.rs:65:40 [INFO] [stderr] | [INFO] [stderr] 65 | let indicator = Self { length: length, k: k, current: 0f64, is_new: true }; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `length` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/indicators/exponential_moving_average.rs:65:56 [INFO] [stderr] | [INFO] [stderr] 65 | let indicator = Self { length: length, k: k, current: 0f64, is_new: true }; [INFO] [stderr] | ^^^^ help: replace it with: `k` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/indicators/simple_moving_average.rs:53:21 [INFO] [stderr] | [INFO] [stderr] 53 | n: n, [INFO] [stderr] | ^^^^ help: replace it with: `n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/indicators/relative_strength_index.rs:80:13 [INFO] [stderr] | [INFO] [stderr] 80 | n: n, [INFO] [stderr] | ^^^^ help: replace it with: `n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/indicators/minimum.rs:41:13 [INFO] [stderr] | [INFO] [stderr] 41 | n: n, [INFO] [stderr] | ^^^^ help: replace it with: `n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/indicators/maximum.rs:42:13 [INFO] [stderr] | [INFO] [stderr] 42 | n: n, [INFO] [stderr] | ^^^^ help: replace it with: `n` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/indicators/fast_stochastic.rs:50:13 [INFO] [stderr] | [INFO] [stderr] 50 | length: length, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `length` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] Checking csv v0.15.0 [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/helpers.rs:5:12 [INFO] [stderr] | [INFO] [stderr] 5 | } else { [INFO] [stderr] | ____________^ [INFO] [stderr] 6 | | if b > c { b } else { c } [INFO] [stderr] 7 | | } [INFO] [stderr] | |_____^ help: try: `if b > c { b } else { c }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/indicators/relative_strength_index.rs:102:16 [INFO] [stderr] | [INFO] [stderr] 102 | } else { [INFO] [stderr] | ________________^ [INFO] [stderr] 103 | | if input > self.prev_val { [INFO] [stderr] 104 | | up = input - self.prev_val; [INFO] [stderr] 105 | | } else { [INFO] [stderr] 106 | | down = self.prev_val - input; [INFO] [stderr] 107 | | } [INFO] [stderr] 108 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 102 | } else if input > self.prev_val { [INFO] [stderr] 103 | up = input - self.prev_val; [INFO] [stderr] 104 | } else { [INFO] [stderr] 105 | down = self.prev_val - input; [INFO] [stderr] 106 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/indicators/exponential_moving_average.rs:64:33 [INFO] [stderr] | [INFO] [stderr] 64 | let k = 2f64 / (length as f64 + 1f64); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `f64::from(length)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/indicators/simple_moving_average.rs:79:20 [INFO] [stderr] | [INFO] [stderr] 79 | self.sum / (self.count as f64) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(self.count)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/indicators/relative_strength_index.rs:95:9 [INFO] [stderr] | [INFO] [stderr] 95 | / let mut down = 0.0; [INFO] [stderr] 96 | | [INFO] [stderr] 97 | | if self.is_new { [INFO] [stderr] 98 | | self.is_new = false; [INFO] [stderr] ... | [INFO] [stderr] 107 | | } [INFO] [stderr] 108 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let down = if self.is_new { ..; 0.1 } else { ..; 0.0 };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/indicators/minimum.rs:36:12 [INFO] [stderr] | [INFO] [stderr] 36 | if n <= 0 { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using n == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/indicators/maximum.rs:37:12 [INFO] [stderr] | [INFO] [stderr] 37 | if n <= 0 { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using n == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/indicators/fast_stochastic.rs:69:12 [INFO] [stderr] | [INFO] [stderr] 69 | if min == max { [INFO] [stderr] | ^^^^^^^^^^ help: consider comparing them within some error: `(min - max).abs() < error` [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::float_cmp)] on by default [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/indicators/fast_stochastic.rs:69:12 [INFO] [stderr] | [INFO] [stderr] 69 | if min == max { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/indicators/fast_stochastic.rs:87:12 [INFO] [stderr] | [INFO] [stderr] 87 | if highest == lowest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(highest - lowest).abs() < error` [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/indicators/fast_stochastic.rs:87:12 [INFO] [stderr] | [INFO] [stderr] 87 | if highest == lowest { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] [INFO] [stderr] warning: use of a blacklisted/placeholder name `bar` [INFO] [stderr] --> src/indicators/true_range.rs:88:24 [INFO] [stderr] | [INFO] [stderr] 88 | fn next(&mut self, bar: &'a T) -> Self::Output { [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::blacklisted_name)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blacklisted_name [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `data_item::DataItemBuilder` [INFO] [stderr] --> src/data_item.rs:82:5 [INFO] [stderr] | [INFO] [stderr] 82 | / pub fn new() -> Self { [INFO] [stderr] 83 | | Self { [INFO] [stderr] 84 | | open: None, [INFO] [stderr] 85 | | high: None, [INFO] [stderr] ... | [INFO] [stderr] 89 | | } [INFO] [stderr] 90 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 73 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/data_item.rs:120:16 [INFO] [stderr] | [INFO] [stderr] 120 | if low <= open && low <= close && low <= high && [INFO] [stderr] | ________________^ [INFO] [stderr] 121 | | high >= open && high >= close && high >= low && [INFO] [stderr] 122 | | volume >= 0.0 && low >= 0.0 [INFO] [stderr] | |___________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 120 | if low <= open && low <= close && low <= high && high >= open && high >= close && volume >= 0.0 && low >= 0.0 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] 120 | if !(!low >= 0.0 || !volume >= 0.0 || !high >= close || !high >= open || !low <= high || !low <= close || !low <= open) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: aborting due to 4 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `ta`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: build failed [INFO] running `"docker" "inspect" "a2addcfdaf0e96691dd9b2ad4974502400915d61abd1024948ae84ed5f4cadb9"` [INFO] running `"docker" "rm" "-f" "a2addcfdaf0e96691dd9b2ad4974502400915d61abd1024948ae84ed5f4cadb9"` [INFO] [stdout] a2addcfdaf0e96691dd9b2ad4974502400915d61abd1024948ae84ed5f4cadb9