[INFO] crate writium 0.1.1 is already in cache [INFO] extracting crate writium 0.1.1 into work/ex/clippy-test-run/sources/stable/reg/writium/0.1.1 [INFO] extracting crate writium 0.1.1 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/writium/0.1.1 [INFO] validating manifest of writium-0.1.1 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 writium-0.1.1 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 writium-0.1.1 [INFO] finished frobbing writium-0.1.1 [INFO] frobbed toml for writium-0.1.1 written to work/ex/clippy-test-run/sources/stable/reg/writium/0.1.1/Cargo.toml [INFO] started frobbing writium-0.1.1 [INFO] finished frobbing writium-0.1.1 [INFO] frobbed toml for writium-0.1.1 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/writium/0.1.1/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 writium-0.1.1 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/writium/0.1.1:/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] c1a16defe189d23c38b4b45b40dfa599953c072cec78f49a8de80d1ddb1d3f70 [INFO] running `"docker" "start" "-a" "c1a16defe189d23c38b4b45b40dfa599953c072cec78f49a8de80d1ddb1d3f70"` [INFO] [stderr] Checking serde_qs v0.3.0 [INFO] [stderr] Checking writium v0.1.1 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/namespace.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | name: name, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/namespace.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | name: name, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `name` [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/proto/request.rs:44:13 [INFO] [stderr] | [INFO] [stderr] 44 | method: method, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `method` [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/error.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | status: status, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `status` [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/error.rs:26:13 [INFO] [stderr] | [INFO] [stderr] 26 | description: description, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `description` [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] | [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/proto/request.rs:44:13 [INFO] [stderr] | [INFO] [stderr] 44 | method: method, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `method` [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/error.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | status: status, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `status` [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/error.rs:26:13 [INFO] [stderr] | [INFO] [stderr] 26 | description: description, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `description` [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: you should consider adding a `Default` implementation for `writium::Writium` [INFO] [stderr] --> src/writium.rs:16:5 [INFO] [stderr] | [INFO] [stderr] 16 | / pub fn new() -> Writium { [INFO] [stderr] 17 | | Writium { [INFO] [stderr] 18 | | ns: Arc::new(Namespace::new(&[])), [INFO] [stderr] 19 | | } [INFO] [stderr] 20 | | } [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] 14 | impl Default for writium::Writium { [INFO] [stderr] 15 | fn default() -> Self { [INFO] [stderr] 16 | Self::new() [INFO] [stderr] 17 | } [INFO] [stderr] 18 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `while let` loop [INFO] [stderr] --> src/writium.rs:48:29 [INFO] [stderr] | [INFO] [stderr] 48 | / loop { [INFO] [stderr] 49 | | if let Some(cause) = err.cause() { [INFO] [stderr] 50 | | log.push(format!("\tBy: {}", cause)); [INFO] [stderr] 51 | | err = cause; [INFO] [stderr] ... | [INFO] [stderr] 54 | | } [INFO] [stderr] 55 | | } [INFO] [stderr] | |_____________________________^ help: try: `while let Some(cause) = err.cause() { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/proto/request.rs:109:16 [INFO] [stderr] | [INFO] [stderr] 109 | if path.len() != 0 && path.as_bytes()[0] == b'/' { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!path.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/proto/request.rs:140:36 [INFO] [stderr] | [INFO] [stderr] 140 | self.path_segs = path_segs.into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/proto/request.rs:226:12 [INFO] [stderr] | [INFO] [stderr] 226 | if self.path_segs.len() > 0 && [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.path_segs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/proto/request.rs:227:13 [INFO] [stderr] | [INFO] [stderr] 227 | &self.path_segs[0] == seg { [INFO] [stderr] | ------------------^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `self.path_segs[0]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/proto/request.rs:257:12 [INFO] [stderr] | [INFO] [stderr] 257 | if self.path_segs.len() > 0 && pred(&self.path_segs[0]) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.path_segs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `proto::response::Response` [INFO] [stderr] --> src/proto/response.rs:21:5 [INFO] [stderr] | [INFO] [stderr] 21 | / pub fn new() -> Self { [INFO] [stderr] 22 | | Response { [INFO] [stderr] 23 | | status: StatusCode::Ok, [INFO] [stderr] 24 | | headers: Headers::new(), [INFO] [stderr] 25 | | body: Vec::new(), [INFO] [stderr] 26 | | } [INFO] [stderr] 27 | | } [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] 14 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/proto/response.rs:30:9 [INFO] [stderr] | [INFO] [stderr] 30 | self.status.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.status` [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 `writium::Writium` [INFO] [stderr] --> src/writium.rs:16:5 [INFO] [stderr] | [INFO] [stderr] 16 | / pub fn new() -> Writium { [INFO] [stderr] 17 | | Writium { [INFO] [stderr] 18 | | ns: Arc::new(Namespace::new(&[])), [INFO] [stderr] 19 | | } [INFO] [stderr] 20 | | } [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] 14 | impl Default for writium::Writium { [INFO] [stderr] 15 | fn default() -> Self { [INFO] [stderr] 16 | Self::new() [INFO] [stderr] 17 | } [INFO] [stderr] 18 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `while let` loop [INFO] [stderr] --> src/writium.rs:48:29 [INFO] [stderr] | [INFO] [stderr] 48 | / loop { [INFO] [stderr] 49 | | if let Some(cause) = err.cause() { [INFO] [stderr] 50 | | log.push(format!("\tBy: {}", cause)); [INFO] [stderr] 51 | | err = cause; [INFO] [stderr] ... | [INFO] [stderr] 54 | | } [INFO] [stderr] 55 | | } [INFO] [stderr] | |_____________________________^ help: try: `while let Some(cause) = err.cause() { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/proto/request.rs:109:16 [INFO] [stderr] | [INFO] [stderr] 109 | if path.len() != 0 && path.as_bytes()[0] == b'/' { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!path.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/proto/request.rs:140:36 [INFO] [stderr] | [INFO] [stderr] 140 | self.path_segs = path_segs.into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/proto/request.rs:226:12 [INFO] [stderr] | [INFO] [stderr] 226 | if self.path_segs.len() > 0 && [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.path_segs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/proto/request.rs:227:13 [INFO] [stderr] | [INFO] [stderr] 227 | &self.path_segs[0] == seg { [INFO] [stderr] | ------------------^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `self.path_segs[0]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/proto/request.rs:257:12 [INFO] [stderr] | [INFO] [stderr] 257 | if self.path_segs.len() > 0 && pred(&self.path_segs[0]) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.path_segs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `proto::response::Response` [INFO] [stderr] --> src/proto/response.rs:21:5 [INFO] [stderr] | [INFO] [stderr] 21 | / pub fn new() -> Self { [INFO] [stderr] 22 | | Response { [INFO] [stderr] 23 | | status: StatusCode::Ok, [INFO] [stderr] 24 | | headers: Headers::new(), [INFO] [stderr] 25 | | body: Vec::new(), [INFO] [stderr] 26 | | } [INFO] [stderr] 27 | | } [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] 14 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/proto/response.rs:30:9 [INFO] [stderr] | [INFO] [stderr] 30 | self.status.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.status` [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] Finished dev [unoptimized + debuginfo] target(s) in 10.31s [INFO] running `"docker" "inspect" "c1a16defe189d23c38b4b45b40dfa599953c072cec78f49a8de80d1ddb1d3f70"` [INFO] running `"docker" "rm" "-f" "c1a16defe189d23c38b4b45b40dfa599953c072cec78f49a8de80d1ddb1d3f70"` [INFO] [stdout] c1a16defe189d23c38b4b45b40dfa599953c072cec78f49a8de80d1ddb1d3f70