[INFO] updating cached repository komamitsu/rust-toy-http-server [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/komamitsu/rust-toy-http-server [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/komamitsu/rust-toy-http-server" "work/ex/clippy-test-run/sources/stable/gh/komamitsu/rust-toy-http-server"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/komamitsu/rust-toy-http-server'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/komamitsu/rust-toy-http-server" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/komamitsu/rust-toy-http-server"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/komamitsu/rust-toy-http-server'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] bfceaf9197e31a1d20d2d5674cb0cfff0b9b5baf [INFO] sha for GitHub repo komamitsu/rust-toy-http-server: bfceaf9197e31a1d20d2d5674cb0cfff0b9b5baf [INFO] validating manifest of komamitsu/rust-toy-http-server 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 komamitsu/rust-toy-http-server 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 komamitsu/rust-toy-http-server [INFO] finished frobbing komamitsu/rust-toy-http-server [INFO] frobbed toml for komamitsu/rust-toy-http-server written to work/ex/clippy-test-run/sources/stable/gh/komamitsu/rust-toy-http-server/Cargo.toml [INFO] started frobbing komamitsu/rust-toy-http-server [INFO] finished frobbing komamitsu/rust-toy-http-server [INFO] frobbed toml for komamitsu/rust-toy-http-server written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/komamitsu/rust-toy-http-server/Cargo.toml [INFO] crate komamitsu/rust-toy-http-server 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 komamitsu/rust-toy-http-server 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/gh/komamitsu/rust-toy-http-server:/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] 2769eb783e35799f7ebc67aa2f20a7748322811260cfaf893eac5cdbafcd8866 [INFO] running `"docker" "start" "-a" "2769eb783e35799f7ebc67aa2f20a7748322811260cfaf893eac5cdbafcd8866"` [INFO] [stderr] Checking rust-toy-http-server v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:43:25 [INFO] [stderr] | [INFO] [stderr] 43 | ToyHttpServer { host: host, port: port } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `host` [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/main.rs:43:37 [INFO] [stderr] | [INFO] [stderr] 43 | ToyHttpServer { host: host, port: port } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `port` [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/main.rs:43:25 [INFO] [stderr] | [INFO] [stderr] 43 | ToyHttpServer { host: host, port: port } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `host` [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/main.rs:43:37 [INFO] [stderr] | [INFO] [stderr] 43 | ToyHttpServer { host: host, port: port } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `port` [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 seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:104:13 [INFO] [stderr] | [INFO] [stderr] 104 | / match content_length { [INFO] [stderr] 105 | | Some(cl) => { [INFO] [stderr] 106 | | println!("Content-Length: {}", cl); [INFO] [stderr] 107 | | let mut body_content = Vec::new(); [INFO] [stderr] ... | [INFO] [stderr] 112 | | None => () [INFO] [stderr] 113 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 104 | if let Some(cl) = content_length { [INFO] [stderr] 105 | println!("Content-Length: {}", cl); [INFO] [stderr] 106 | let mut body_content = Vec::new(); [INFO] [stderr] 107 | Self::read_body(cl, &mut stream, &mut body_content); [INFO] [stderr] 108 | // TODO: Do something [INFO] [stderr] 109 | println!("Content Body: {:?}", String::from_utf8(body_content)); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/main.rs:116:13 [INFO] [stderr] | [INFO] [stderr] 116 | / stream.write( [INFO] [stderr] 117 | | b"HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 12\r\n\r\nHello world!").unwrap(); [INFO] [stderr] | |__________________________________________________________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `rust-toy-http-server`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:104:13 [INFO] [stderr] | [INFO] [stderr] 104 | / match content_length { [INFO] [stderr] 105 | | Some(cl) => { [INFO] [stderr] 106 | | println!("Content-Length: {}", cl); [INFO] [stderr] 107 | | let mut body_content = Vec::new(); [INFO] [stderr] ... | [INFO] [stderr] 112 | | None => () [INFO] [stderr] 113 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 104 | if let Some(cl) = content_length { [INFO] [stderr] 105 | println!("Content-Length: {}", cl); [INFO] [stderr] 106 | let mut body_content = Vec::new(); [INFO] [stderr] 107 | Self::read_body(cl, &mut stream, &mut body_content); [INFO] [stderr] 108 | // TODO: Do something [INFO] [stderr] 109 | println!("Content Body: {:?}", String::from_utf8(body_content)); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/main.rs:116:13 [INFO] [stderr] | [INFO] [stderr] 116 | / stream.write( [INFO] [stderr] 117 | | b"HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 12\r\n\r\nHello world!").unwrap(); [INFO] [stderr] | |__________________________________________________________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `rust-toy-http-server`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "2769eb783e35799f7ebc67aa2f20a7748322811260cfaf893eac5cdbafcd8866"` [INFO] running `"docker" "rm" "-f" "2769eb783e35799f7ebc67aa2f20a7748322811260cfaf893eac5cdbafcd8866"` [INFO] [stdout] 2769eb783e35799f7ebc67aa2f20a7748322811260cfaf893eac5cdbafcd8866