[INFO] updating cached repository Jason2605/simple-http [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Jason2605/simple-http [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Jason2605/simple-http" "work/ex/clippy-test-run/sources/stable/gh/Jason2605/simple-http"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Jason2605/simple-http'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Jason2605/simple-http" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Jason2605/simple-http"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Jason2605/simple-http'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] d5f2bd7b88ff78485ff3dfc25684a6b15a309bf4 [INFO] sha for GitHub repo Jason2605/simple-http: d5f2bd7b88ff78485ff3dfc25684a6b15a309bf4 [INFO] validating manifest of Jason2605/simple-http 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 Jason2605/simple-http 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 Jason2605/simple-http [INFO] finished frobbing Jason2605/simple-http [INFO] frobbed toml for Jason2605/simple-http written to work/ex/clippy-test-run/sources/stable/gh/Jason2605/simple-http/Cargo.toml [INFO] started frobbing Jason2605/simple-http [INFO] finished frobbing Jason2605/simple-http [INFO] frobbed toml for Jason2605/simple-http written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Jason2605/simple-http/Cargo.toml [INFO] crate Jason2605/simple-http 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 Jason2605/simple-http 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/gh/Jason2605/simple-http:/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] bb4b488145d57bbba9d722aebb61a8f70dac3430385b07d11da66853739ea787 [INFO] running `"docker" "start" "-a" "bb4b488145d57bbba9d722aebb61a8f70dac3430385b07d11da66853739ea787"` [INFO] [stderr] Checking gzip-header v0.1.2 [INFO] [stderr] Checking deflate v0.7.17 [INFO] [stderr] Checking simple-http v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/handle_request/routes/respond.rs:34:5 [INFO] [stderr] | [INFO] [stderr] 34 | response [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/handle_request/routes/respond.rs:28:20 [INFO] [stderr] | [INFO] [stderr] 28 | let response = Response { [INFO] [stderr] | ____________________^ [INFO] [stderr] 29 | | status_code, [INFO] [stderr] 30 | | content_type: String::from(content_type), [INFO] [stderr] 31 | | contents, [INFO] [stderr] 32 | | }; [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: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/handle_request/status.rs:49:5 [INFO] [stderr] | [INFO] [stderr] 49 | / pub fn from_str(value: &str) -> RequestType { [INFO] [stderr] 50 | | match value { [INFO] [stderr] 51 | | "GET" => RequestType::GET, [INFO] [stderr] 52 | | "POST" => RequestType::POST, [INFO] [stderr] ... | [INFO] [stderr] 58 | | } [INFO] [stderr] 59 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/handle_request/routes/respond.rs:25:57 [INFO] [stderr] | [INFO] [stderr] 25 | content_types::find_content_type(filename.split(".").last().unwrap()) [INFO] [stderr] | ^^^ help: try using a char instead: `'.'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/handle_request/routes/mod.rs:7:1 [INFO] [stderr] | [INFO] [stderr] 7 | / pub fn find_route<'a>(route: &'a str, http_request_type: RequestType) -> respond::Response { [INFO] [stderr] 8 | | [INFO] [stderr] 9 | | //Ensure they arent trying a directory traversal [INFO] [stderr] 10 | | if route.contains("./") || route.contains("../") { [INFO] [stderr] ... | [INFO] [stderr] 19 | | } [INFO] [stderr] 20 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: handle read amount returned or use `Read::read_exact` instead [INFO] [stderr] --> src/handle_request/mod.rs:12:5 [INFO] [stderr] | [INFO] [stderr] 12 | stream.read(&mut buffer).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: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/handle_request/mod.rs:22:5 [INFO] [stderr] | [INFO] [stderr] 22 | stream.write(&response.contents).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/handle_request/mod.rs:26:1 [INFO] [stderr] | [INFO] [stderr] 26 | / fn parse_http<'a>(http_stream: &'a str) -> (&'a str, status::RequestType, bool) { [INFO] [stderr] 27 | | [INFO] [stderr] 28 | | let http_verb = http_stream.split_whitespace().next().unwrap(); [INFO] [stderr] 29 | | let http_request_type = status::RequestType::from_str(http_verb); [INFO] [stderr] ... | [INFO] [stderr] 32 | | (http_request[1], http_request_type, compress) [INFO] [stderr] 33 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/handle_request/routes/respond.rs:34:5 [INFO] [stderr] | [INFO] [stderr] 34 | response [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/handle_request/routes/respond.rs:28:20 [INFO] [stderr] | [INFO] [stderr] 28 | let response = Response { [INFO] [stderr] | ____________________^ [INFO] [stderr] 29 | | status_code, [INFO] [stderr] 30 | | content_type: String::from(content_type), [INFO] [stderr] 31 | | contents, [INFO] [stderr] 32 | | }; [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: identical conversion [INFO] [stderr] --> src/thread/mod.rs:19:25 [INFO] [stderr] | [INFO] [stderr] 19 | let error = String::from(format!("{} is not a valid amount of threads!", size)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{} is not a valid amount of threads!", size)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `simple-http`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/handle_request/status.rs:49:5 [INFO] [stderr] | [INFO] [stderr] 49 | / pub fn from_str(value: &str) -> RequestType { [INFO] [stderr] 50 | | match value { [INFO] [stderr] 51 | | "GET" => RequestType::GET, [INFO] [stderr] 52 | | "POST" => RequestType::POST, [INFO] [stderr] ... | [INFO] [stderr] 58 | | } [INFO] [stderr] 59 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/handle_request/routes/respond.rs:25:57 [INFO] [stderr] | [INFO] [stderr] 25 | content_types::find_content_type(filename.split(".").last().unwrap()) [INFO] [stderr] | ^^^ help: try using a char instead: `'.'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/handle_request/routes/mod.rs:7:1 [INFO] [stderr] | [INFO] [stderr] 7 | / pub fn find_route<'a>(route: &'a str, http_request_type: RequestType) -> respond::Response { [INFO] [stderr] 8 | | [INFO] [stderr] 9 | | //Ensure they arent trying a directory traversal [INFO] [stderr] 10 | | if route.contains("./") || route.contains("../") { [INFO] [stderr] ... | [INFO] [stderr] 19 | | } [INFO] [stderr] 20 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: handle read amount returned or use `Read::read_exact` instead [INFO] [stderr] --> src/handle_request/mod.rs:12:5 [INFO] [stderr] | [INFO] [stderr] 12 | stream.read(&mut buffer).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: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/handle_request/mod.rs:22:5 [INFO] [stderr] | [INFO] [stderr] 22 | stream.write(&response.contents).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/handle_request/mod.rs:26:1 [INFO] [stderr] | [INFO] [stderr] 26 | / fn parse_http<'a>(http_stream: &'a str) -> (&'a str, status::RequestType, bool) { [INFO] [stderr] 27 | | [INFO] [stderr] 28 | | let http_verb = http_stream.split_whitespace().next().unwrap(); [INFO] [stderr] 29 | | let http_request_type = status::RequestType::from_str(http_verb); [INFO] [stderr] ... | [INFO] [stderr] 32 | | (http_request[1], http_request_type, compress) [INFO] [stderr] 33 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/thread/mod.rs:19:25 [INFO] [stderr] | [INFO] [stderr] 19 | let error = String::from(format!("{} is not a valid amount of threads!", size)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{} is not a valid amount of threads!", size)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `simple-http`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "bb4b488145d57bbba9d722aebb61a8f70dac3430385b07d11da66853739ea787"` [INFO] running `"docker" "rm" "-f" "bb4b488145d57bbba9d722aebb61a8f70dac3430385b07d11da66853739ea787"` [INFO] [stdout] bb4b488145d57bbba9d722aebb61a8f70dac3430385b07d11da66853739ea787