[INFO] crate task_queue 0.0.7 is already in cache [INFO] extracting crate task_queue 0.0.7 into work/ex/clippy-test-run/sources/stable/reg/task_queue/0.0.7 [INFO] extracting crate task_queue 0.0.7 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/task_queue/0.0.7 [INFO] validating manifest of task_queue-0.0.7 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 task_queue-0.0.7 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 task_queue-0.0.7 [INFO] finished frobbing task_queue-0.0.7 [INFO] frobbed toml for task_queue-0.0.7 written to work/ex/clippy-test-run/sources/stable/reg/task_queue/0.0.7/Cargo.toml [INFO] started frobbing task_queue-0.0.7 [INFO] finished frobbing task_queue-0.0.7 [INFO] frobbed toml for task_queue-0.0.7 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/task_queue/0.0.7/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 task_queue-0.0.7 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/task_queue/0.0.7:/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] 46cc42b36acc2dcc847d07c7c4384040c9a28ebf795e3b79350b5bd0382e8d5b [INFO] running `"docker" "start" "-a" "46cc42b36acc2dcc847d07c7c4384040c9a28ebf795e3b79350b5bd0382e8d5b"` [INFO] [stderr] Checking task_queue v0.0.7 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/spawn_policy.rs:70:13 [INFO] [stderr] | [INFO] [stderr] 70 | delta: delta, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `delta` [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/pipe.rs:33:13 [INFO] [stderr] | [INFO] [stderr] 33 | target: target, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `target` [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/pipe.rs:34:13 [INFO] [stderr] | [INFO] [stderr] 34 | priority: priority, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `priority` [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/pipe.rs:35:13 [INFO] [stderr] | [INFO] [stderr] 35 | data: data, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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/lib.rs:334:13 [INFO] [stderr] | [INFO] [stderr] 334 | receiver: receiver, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `receiver` [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/lib.rs:335:13 [INFO] [stderr] | [INFO] [stderr] 335 | handle: handle, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `handle` [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/spawn_policy.rs:70:13 [INFO] [stderr] | [INFO] [stderr] 70 | delta: delta, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `delta` [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/pipe.rs:33:13 [INFO] [stderr] | [INFO] [stderr] 33 | target: target, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `target` [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/pipe.rs:34:13 [INFO] [stderr] | [INFO] [stderr] 34 | priority: priority, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `priority` [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/pipe.rs:35:13 [INFO] [stderr] | [INFO] [stderr] 35 | data: data, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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/lib.rs:334:13 [INFO] [stderr] | [INFO] [stderr] 334 | receiver: receiver, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `receiver` [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/lib.rs:335:13 [INFO] [stderr] | [INFO] [stderr] 335 | handle: handle, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `handle` [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: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/pipe.rs:57:9 [INFO] [stderr] | [INFO] [stderr] 57 | result [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/pipe.rs:56:22 [INFO] [stderr] | [INFO] [stderr] 56 | let result = guard.drain(..).map(|m| m.data).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/error.rs:42:9 [INFO] [stderr] | [INFO] [stderr] 42 | / match self { [INFO] [stderr] 43 | | &TaskQueueError::IllegalStartThreads { .. } => "Illegal number of threads was received", [INFO] [stderr] 44 | | &TaskQueueError::Io(ref e) => e.description(), [INFO] [stderr] 45 | | &TaskQueueError::IllegalPolicyThreads { .. } => "Policy was returned illegal number of threads", [INFO] [stderr] 46 | | [INFO] [stderr] 47 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 42 | match *self { [INFO] [stderr] 43 | TaskQueueError::IllegalStartThreads { .. } => "Illegal number of threads was received", [INFO] [stderr] 44 | TaskQueueError::Io(ref e) => e.description(), [INFO] [stderr] 45 | TaskQueueError::IllegalPolicyThreads { .. } => "Policy was returned illegal number of threads", [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/error.rs:51:9 [INFO] [stderr] | [INFO] [stderr] 51 | / match self { [INFO] [stderr] 52 | | &TaskQueueError::IllegalStartThreads { .. } => None, [INFO] [stderr] 53 | | &TaskQueueError::Io(ref e) => Some(e), [INFO] [stderr] 54 | | &TaskQueueError::IllegalPolicyThreads { .. } => None, [INFO] [stderr] 55 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 51 | match *self { [INFO] [stderr] 52 | TaskQueueError::IllegalStartThreads { .. } => None, [INFO] [stderr] 53 | TaskQueueError::Io(ref e) => Some(e), [INFO] [stderr] 54 | TaskQueueError::IllegalPolicyThreads { .. } => None, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/error.rs:61:9 [INFO] [stderr] | [INFO] [stderr] 61 | / match self { [INFO] [stderr] 62 | | &TaskQueueError::IllegalStartThreads { min, max } => write!(f, "Illegal number of threads was received min:{} max:{}", min, max), [INFO] [stderr] 63 | | &TaskQueueError::Io(ref err) => write!(f, "IO error: {}", err), [INFO] [stderr] 64 | | &TaskQueueError::IllegalPolicyThreads { min, max, count } => write!(f, "Policy returned illegal number of threads min:{} max:{} count:{}", min, max, count) [INFO] [stderr] 65 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 61 | match *self { [INFO] [stderr] 62 | TaskQueueError::IllegalStartThreads { min, max } => write!(f, "Illegal number of threads was received min:{} max:{}", min, max), [INFO] [stderr] 63 | TaskQueueError::Io(ref err) => write!(f, "IO error: {}", err), [INFO] [stderr] 64 | TaskQueueError::IllegalPolicyThreads { min, max, count } => write!(f, "Policy returned illegal number of threads min:{} max:{} count:{}", min, max, count) [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/pipe.rs:57:9 [INFO] [stderr] | [INFO] [stderr] 57 | result [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/pipe.rs:56:22 [INFO] [stderr] | [INFO] [stderr] 56 | let result = guard.drain(..).map(|m| m.data).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `spawn_policy::StaticSpawnPolicy` [INFO] [stderr] --> src/spawn_policy.rs:31:5 [INFO] [stderr] | [INFO] [stderr] 31 | / pub fn new() -> Self { [INFO] [stderr] 32 | | StaticSpawnPolicy [INFO] [stderr] 33 | | } [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] 27 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you should consider adding a `Default` implementation for `spawn_policy::DynamicSpawnPolicy` [INFO] [stderr] --> src/spawn_policy.rs:60:5 [INFO] [stderr] | [INFO] [stderr] 60 | / pub fn new() -> Self { [INFO] [stderr] 61 | | Self::with_delta(Duration::from_secs(60 * 5)) [INFO] [stderr] 62 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 57 | impl Default for spawn_policy::DynamicSpawnPolicy { [INFO] [stderr] 58 | fn default() -> Self { [INFO] [stderr] 59 | Self::new() [INFO] [stderr] 60 | } [INFO] [stderr] 61 | } [INFO] [stderr] | [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/spawn_policy.rs:104:30 [INFO] [stderr] | [INFO] [stderr] 104 | let tasks_for_down = stats.tasks_count <= TASKS_IN_QUEUE_DOWN; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because TASKS_IN_QUEUE_DOWN is the minimum value for this type, the case where the two sides are not equal never occurs, consider using stats.tasks_count == TASKS_IN_QUEUE_DOWN 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] warning: redundant pattern matching, consider using `is_none()` [INFO] [stderr] --> src/spawn_policy.rs:140:16 [INFO] [stderr] | [INFO] [stderr] 140 | if let None = self.first_call_at { [INFO] [stderr] | _________- ^^^^ [INFO] [stderr] 141 | | self.first_call_at = Some(SystemTime::now()); [INFO] [stderr] 142 | | } [INFO] [stderr] | |_________- help: try this: `if self.first_call_at.is_none()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `spawn_policy::ManualSpawnPolicy` [INFO] [stderr] --> src/spawn_policy.rs:189:5 [INFO] [stderr] | [INFO] [stderr] 189 | / pub fn new() -> Self { [INFO] [stderr] 190 | | Self::with_threads(10) [INFO] [stderr] 191 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [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] 183 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/pipe.rs:141:22 [INFO] [stderr] | [INFO] [stderr] 141 | let result = self.clone(); [INFO] [stderr] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: you should consider adding a `Default` implementation for `TaskQueue` [INFO] [stderr] --> src/lib.rs:71:5 [INFO] [stderr] | [INFO] [stderr] 71 | / pub fn new() -> Self { [INFO] [stderr] 72 | | TaskQueue::with_threads(10, 10).expect("10 and 10 satisfy with_threads method validation") [INFO] [stderr] 73 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 69 | impl Default for TaskQueue { [INFO] [stderr] 70 | fn default() -> Self { [INFO] [stderr] 71 | Self::new() [INFO] [stderr] 72 | } [INFO] [stderr] 73 | } [INFO] [stderr] | [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/lib.rs:77:12 [INFO] [stderr] | [INFO] [stderr] 77 | if min <= 0 || max <= 0 || max < min { [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 min == 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/lib.rs:77:24 [INFO] [stderr] | [INFO] [stderr] 77 | if min <= 0 || max <= 0 || max < min { [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 max == 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] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:124:32 [INFO] [stderr] | [INFO] [stderr] 124 | let receiver = info.receiver.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `info.receiver` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `task_queue`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/error.rs:42:9 [INFO] [stderr] | [INFO] [stderr] 42 | / match self { [INFO] [stderr] 43 | | &TaskQueueError::IllegalStartThreads { .. } => "Illegal number of threads was received", [INFO] [stderr] 44 | | &TaskQueueError::Io(ref e) => e.description(), [INFO] [stderr] 45 | | &TaskQueueError::IllegalPolicyThreads { .. } => "Policy was returned illegal number of threads", [INFO] [stderr] 46 | | [INFO] [stderr] 47 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 42 | match *self { [INFO] [stderr] 43 | TaskQueueError::IllegalStartThreads { .. } => "Illegal number of threads was received", [INFO] [stderr] 44 | TaskQueueError::Io(ref e) => e.description(), [INFO] [stderr] 45 | TaskQueueError::IllegalPolicyThreads { .. } => "Policy was returned illegal number of threads", [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/error.rs:51:9 [INFO] [stderr] | [INFO] [stderr] 51 | / match self { [INFO] [stderr] 52 | | &TaskQueueError::IllegalStartThreads { .. } => None, [INFO] [stderr] 53 | | &TaskQueueError::Io(ref e) => Some(e), [INFO] [stderr] 54 | | &TaskQueueError::IllegalPolicyThreads { .. } => None, [INFO] [stderr] 55 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 51 | match *self { [INFO] [stderr] 52 | TaskQueueError::IllegalStartThreads { .. } => None, [INFO] [stderr] 53 | TaskQueueError::Io(ref e) => Some(e), [INFO] [stderr] 54 | TaskQueueError::IllegalPolicyThreads { .. } => None, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/error.rs:61:9 [INFO] [stderr] | [INFO] [stderr] 61 | / match self { [INFO] [stderr] 62 | | &TaskQueueError::IllegalStartThreads { min, max } => write!(f, "Illegal number of threads was received min:{} max:{}", min, max), [INFO] [stderr] 63 | | &TaskQueueError::Io(ref err) => write!(f, "IO error: {}", err), [INFO] [stderr] 64 | | &TaskQueueError::IllegalPolicyThreads { min, max, count } => write!(f, "Policy returned illegal number of threads min:{} max:{} count:{}", min, max, count) [INFO] [stderr] 65 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 61 | match *self { [INFO] [stderr] 62 | TaskQueueError::IllegalStartThreads { min, max } => write!(f, "Illegal number of threads was received min:{} max:{}", min, max), [INFO] [stderr] 63 | TaskQueueError::Io(ref err) => write!(f, "IO error: {}", err), [INFO] [stderr] 64 | TaskQueueError::IllegalPolicyThreads { min, max, count } => write!(f, "Policy returned illegal number of threads min:{} max:{} count:{}", min, max, count) [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `spawn_policy::StaticSpawnPolicy` [INFO] [stderr] --> src/spawn_policy.rs:31:5 [INFO] [stderr] | [INFO] [stderr] 31 | / pub fn new() -> Self { [INFO] [stderr] 32 | | StaticSpawnPolicy [INFO] [stderr] 33 | | } [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] 27 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you should consider adding a `Default` implementation for `spawn_policy::DynamicSpawnPolicy` [INFO] [stderr] --> src/spawn_policy.rs:60:5 [INFO] [stderr] | [INFO] [stderr] 60 | / pub fn new() -> Self { [INFO] [stderr] 61 | | Self::with_delta(Duration::from_secs(60 * 5)) [INFO] [stderr] 62 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 57 | impl Default for spawn_policy::DynamicSpawnPolicy { [INFO] [stderr] 58 | fn default() -> Self { [INFO] [stderr] 59 | Self::new() [INFO] [stderr] 60 | } [INFO] [stderr] 61 | } [INFO] [stderr] | [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/spawn_policy.rs:104:30 [INFO] [stderr] | [INFO] [stderr] 104 | let tasks_for_down = stats.tasks_count <= TASKS_IN_QUEUE_DOWN; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because TASKS_IN_QUEUE_DOWN is the minimum value for this type, the case where the two sides are not equal never occurs, consider using stats.tasks_count == TASKS_IN_QUEUE_DOWN 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] warning: redundant pattern matching, consider using `is_none()` [INFO] [stderr] --> src/spawn_policy.rs:140:16 [INFO] [stderr] | [INFO] [stderr] 140 | if let None = self.first_call_at { [INFO] [stderr] | _________- ^^^^ [INFO] [stderr] 141 | | self.first_call_at = Some(SystemTime::now()); [INFO] [stderr] 142 | | } [INFO] [stderr] | |_________- help: try this: `if self.first_call_at.is_none()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `spawn_policy::ManualSpawnPolicy` [INFO] [stderr] --> src/spawn_policy.rs:189:5 [INFO] [stderr] | [INFO] [stderr] 189 | / pub fn new() -> Self { [INFO] [stderr] 190 | | Self::with_threads(10) [INFO] [stderr] 191 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [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] 183 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/pipe.rs:141:22 [INFO] [stderr] | [INFO] [stderr] 141 | let result = self.clone(); [INFO] [stderr] | ^^^^^^^^^^^^ help: try dereferencing it: `*self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: the variable `value` is used as a loop counter. Consider using `for (value, item) in handles.enumerate()` or similar iterators [INFO] [stderr] --> src/pipe.rs:241:23 [INFO] [stderr] | [INFO] [stderr] 241 | for handle in handles { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: you should consider adding a `Default` implementation for `TaskQueue` [INFO] [stderr] --> src/lib.rs:71:5 [INFO] [stderr] | [INFO] [stderr] 71 | / pub fn new() -> Self { [INFO] [stderr] 72 | | TaskQueue::with_threads(10, 10).expect("10 and 10 satisfy with_threads method validation") [INFO] [stderr] 73 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 69 | impl Default for TaskQueue { [INFO] [stderr] 70 | fn default() -> Self { [INFO] [stderr] 71 | Self::new() [INFO] [stderr] 72 | } [INFO] [stderr] 73 | } [INFO] [stderr] | [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/lib.rs:77:12 [INFO] [stderr] | [INFO] [stderr] 77 | if min <= 0 || max <= 0 || max < min { [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 min == 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/lib.rs:77:24 [INFO] [stderr] | [INFO] [stderr] 77 | if min <= 0 || max <= 0 || max < min { [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 max == 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] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:124:32 [INFO] [stderr] | [INFO] [stderr] 124 | let receiver = info.receiver.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `info.receiver` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `task_queue`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "46cc42b36acc2dcc847d07c7c4384040c9a28ebf795e3b79350b5bd0382e8d5b"` [INFO] running `"docker" "rm" "-f" "46cc42b36acc2dcc847d07c7c4384040c9a28ebf795e3b79350b5bd0382e8d5b"` [INFO] [stdout] 46cc42b36acc2dcc847d07c7c4384040c9a28ebf795e3b79350b5bd0382e8d5b