[INFO] updating cached repository asib/candcpp_exercise [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/asib/candcpp_exercise [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/asib/candcpp_exercise" "work/ex/clippy-test-run/sources/stable/gh/asib/candcpp_exercise"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/asib/candcpp_exercise'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/asib/candcpp_exercise" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/asib/candcpp_exercise"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/asib/candcpp_exercise'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] f29cee2b49f6cd760f5870828943acf3de2f147c [INFO] sha for GitHub repo asib/candcpp_exercise: f29cee2b49f6cd760f5870828943acf3de2f147c [INFO] validating manifest of asib/candcpp_exercise 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 asib/candcpp_exercise 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 asib/candcpp_exercise [INFO] finished frobbing asib/candcpp_exercise [INFO] frobbed toml for asib/candcpp_exercise written to work/ex/clippy-test-run/sources/stable/gh/asib/candcpp_exercise/Cargo.toml [INFO] started frobbing asib/candcpp_exercise [INFO] finished frobbing asib/candcpp_exercise [INFO] frobbed toml for asib/candcpp_exercise written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/asib/candcpp_exercise/Cargo.toml [INFO] crate asib/candcpp_exercise has a lockfile. skipping [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 asib/candcpp_exercise against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/asib/candcpp_exercise:/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] ab9dec64a70ddf939d31ac97e71c11fe977e81f317b63860b73f9148e1cd5108 [INFO] running `"docker" "start" "-a" "ab9dec64a70ddf939d31ac97e71c11fe977e81f317b63860b73f9148e1cd5108"` [INFO] [stderr] Checking candcpp_exercise v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:30:12 [INFO] [stderr] | [INFO] [stderr] 30 | if bytes.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `bytes.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: casting u8 to i64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:42:40 [INFO] [stderr] | [INFO] [stderr] 42 | f.seek(SeekFrom::Current(4*(h.ihlen - MIN_IHLEN) as i64)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i64::from(h.ihlen - MIN_IHLEN)` [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/main.rs:57:25 [INFO] [stderr] | [INFO] [stderr] 57 | write!(f, "{}", match self { [INFO] [stderr] | _________________________^ [INFO] [stderr] 58 | | &IPHeaderError::EOF => "EOF", [INFO] [stderr] 59 | | &IPHeaderError::UnexpectedEOF => "UnexpectedEOF" [INFO] [stderr] 60 | | }) [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] 57 | write!(f, "{}", match *self { [INFO] [stderr] 58 | IPHeaderError::EOF => "EOF", [INFO] [stderr] 59 | IPHeaderError::UnexpectedEOF => "UnexpectedEOF" [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: casting u8 to i64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:80:40 [INFO] [stderr] | [INFO] [stderr] 80 | f.seek(SeekFrom::Current(4*(h.data_offset - MIN_DATA_OFFSET) as i64)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i64::from(h.data_offset - MIN_DATA_OFFSET)` [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: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:144:42 [INFO] [stderr] | [INFO] [stderr] 144 | let data_len = iph.total_len - 4*iph.ihlen as u16 - 4*tcph.data_offset as u16; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try: `u16::from(iph.ihlen)` [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: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:144:63 [INFO] [stderr] | [INFO] [stderr] 144 | let data_len = iph.total_len - 4*iph.ihlen as u16 - 4*tcph.data_offset as u16; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(tcph.data_offset)` [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: length comparison to zero [INFO] [stderr] --> src/main.rs:30:12 [INFO] [stderr] | [INFO] [stderr] 30 | if bytes.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `bytes.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: casting u8 to i64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:42:40 [INFO] [stderr] | [INFO] [stderr] 42 | f.seek(SeekFrom::Current(4*(h.ihlen - MIN_IHLEN) as i64)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i64::from(h.ihlen - MIN_IHLEN)` [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/main.rs:57:25 [INFO] [stderr] | [INFO] [stderr] 57 | write!(f, "{}", match self { [INFO] [stderr] | _________________________^ [INFO] [stderr] 58 | | &IPHeaderError::EOF => "EOF", [INFO] [stderr] 59 | | &IPHeaderError::UnexpectedEOF => "UnexpectedEOF" [INFO] [stderr] 60 | | }) [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] 57 | write!(f, "{}", match *self { [INFO] [stderr] 58 | IPHeaderError::EOF => "EOF", [INFO] [stderr] 59 | IPHeaderError::UnexpectedEOF => "UnexpectedEOF" [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: casting u8 to i64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:80:40 [INFO] [stderr] | [INFO] [stderr] 80 | f.seek(SeekFrom::Current(4*(h.data_offset - MIN_DATA_OFFSET) as i64)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i64::from(h.data_offset - MIN_DATA_OFFSET)` [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: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:144:42 [INFO] [stderr] | [INFO] [stderr] 144 | let data_len = iph.total_len - 4*iph.ihlen as u16 - 4*tcph.data_offset as u16; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: try: `u16::from(iph.ihlen)` [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: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:144:63 [INFO] [stderr] | [INFO] [stderr] 144 | let data_len = iph.total_len - 4*iph.ihlen as u16 - 4*tcph.data_offset as u16; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(tcph.data_offset)` [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] Finished dev [unoptimized + debuginfo] target(s) in 0.68s [INFO] running `"docker" "inspect" "ab9dec64a70ddf939d31ac97e71c11fe977e81f317b63860b73f9148e1cd5108"` [INFO] running `"docker" "rm" "-f" "ab9dec64a70ddf939d31ac97e71c11fe977e81f317b63860b73f9148e1cd5108"` [INFO] [stdout] ab9dec64a70ddf939d31ac97e71c11fe977e81f317b63860b73f9148e1cd5108