[INFO] cloning repository https://github.com/hemeda3/codecrafters-http-server-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/hemeda3/codecrafters-http-server-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhemeda3%2Fcodecrafters-http-server-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhemeda3%2Fcodecrafters-http-server-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2fe3e3ce32dc42f61df37bafcbe73e41f88f7d7f [INFO] checking hemeda3/codecrafters-http-server-rust against master#385fa9d845dd326c6bbfd58c22244215e431948a for absurd-question-mark-desugar [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhemeda3%2Fcodecrafters-http-server-rust" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/hemeda3/codecrafters-http-server-rust on toolchain 385fa9d845dd326c6bbfd58c22244215e431948a [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+385fa9d845dd326c6bbfd58c22244215e431948a" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/hemeda3/codecrafters-http-server-rust [INFO] finished tweaking git repo https://github.com/hemeda3/codecrafters-http-server-rust [INFO] tweaked toml for git repo https://github.com/hemeda3/codecrafters-http-server-rust written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/hemeda3/codecrafters-http-server-rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+385fa9d845dd326c6bbfd58c22244215e431948a" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded anyhow v1.0.68 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+385fa9d845dd326c6bbfd58c22244215e431948a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 84cfdb19743d033084a3cb4f69427c39313906f7f5fa2a851b3150360e7dd8ae [INFO] running `Command { std: "docker" "start" "-a" "84cfdb19743d033084a3cb4f69427c39313906f7f5fa2a851b3150360e7dd8ae", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "84cfdb19743d033084a3cb4f69427c39313906f7f5fa2a851b3150360e7dd8ae", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "84cfdb19743d033084a3cb4f69427c39313906f7f5fa2a851b3150360e7dd8ae", kill_on_drop: false }` [INFO] [stdout] 84cfdb19743d033084a3cb4f69427c39313906f7f5fa2a851b3150360e7dd8ae [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+385fa9d845dd326c6bbfd58c22244215e431948a" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4483bde4c405d1fa7aea3068c07a8a186c85ee887ef02f0dd85506f3655485c1 [INFO] running `Command { std: "docker" "start" "-a" "4483bde4c405d1fa7aea3068c07a8a186c85ee887ef02f0dd85506f3655485c1", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling unicode-ident v1.0.11 [INFO] [stderr] Compiling syn v1.0.48 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Compiling tokio v1.29.1 [INFO] [stderr] Compiling anyhow v1.0.68 [INFO] [stderr] Compiling thiserror v1.0.38 [INFO] [stderr] Checking bytes v1.3.0 [INFO] [stderr] Checking lock_api v0.4.10 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking yansi v0.5.1 [INFO] [stderr] Checking pretty_assertions v1.4.0 [INFO] [stderr] Checking itertools v0.11.0 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Compiling quote v1.0.32 [INFO] [stderr] Compiling syn v2.0.27 [INFO] [stderr] Compiling thiserror-impl v1.0.38 [INFO] [stderr] Compiling tokio-macros v2.1.0 [INFO] [stderr] Checking http-server-starter-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around pattern [INFO] [stdout] --> src/main.rs:12:14 [INFO] [stdout] | [INFO] [stdout] 12 | while let(mut stream) = listener.accept().await? { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 12 - while let(mut stream) = listener.accept().await? { [INFO] [stdout] 12 + while let mut stream = listener.accept().await? { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:187:12 [INFO] [stdout] | [INFO] [stdout] 187 | if (cha == '/') { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 187 - if (cha == '/') { [INFO] [stdout] 187 + if cha == '/' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around pattern [INFO] [stdout] --> src/main.rs:12:14 [INFO] [stdout] | [INFO] [stdout] 12 | while let(mut stream) = listener.accept().await? { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 12 - while let(mut stream) = listener.accept().await? { [INFO] [stdout] 12 + while let mut stream = listener.accept().await? { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:187:12 [INFO] [stdout] | [INFO] [stdout] 187 | if (cha == '/') { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 187 - if (cha == '/') { [INFO] [stdout] 187 + if cha == '/' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line2_first_header` [INFO] [stdout] --> src/main.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | let line2_first_header = iter.next(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_line2_first_header` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line3_2nd_header` [INFO] [stdout] --> src/main.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let line3_2nd_header = iter.next(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_line3_2nd_header` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/main.rs:89:25 [INFO] [stdout] | [INFO] [stdout] 89 | let res = results.last().unwrap_or(&""); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:137:33 [INFO] [stdout] | [INFO] [stdout] 137 | ... Err(e) =>{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line2_first_header` [INFO] [stdout] --> src/main.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | let line2_first_header = iter.next(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_line2_first_header` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line3_2nd_header` [INFO] [stdout] --> src/main.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let line3_2nd_header = iter.next(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_line3_2nd_header` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/main.rs:89:25 [INFO] [stdout] | [INFO] [stdout] 89 | let res = results.last().unwrap_or(&""); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:137:33 [INFO] [stdout] | [INFO] [stdout] 137 | ... Err(e) =>{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | let mut buf = String::from_utf8(buf_bytes.clone().into()).ok().unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | let mut body_buff = String::from_utf8(buf_bytes.clone().into()).ok(); [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:120:29 [INFO] [stdout] | [INFO] [stdout] 120 | let mut file = File::open(full_path).await; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: irrefutable `while let` pattern [INFO] [stdout] --> src/main.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | while let(mut stream) = listener.accept().await? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern will always match, so the loop will never exit [INFO] [stdout] = help: consider instead using a `loop { ... }` with a `let` inside it [INFO] [stdout] = note: `#[warn(irrefutable_let_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | let mut buf = String::from_utf8(buf_bytes.clone().into()).ok().unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:12:15 [INFO] [stdout] | [INFO] [stdout] 12 | while let(mut stream) = listener.accept().await? { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | let mut body_buff = String::from_utf8(buf_bytes.clone().into()).ok(); [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:120:29 [INFO] [stdout] | [INFO] [stdout] 120 | let mut file = File::open(full_path).await; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `end` is never read [INFO] [stdout] --> src/main.rs:183:13 [INFO] [stdout] | [INFO] [stdout] 183 | let mut end = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: irrefutable `while let` pattern [INFO] [stdout] --> src/main.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | while let(mut stream) = listener.accept().await? { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern will always match, so the loop will never exit [INFO] [stdout] = help: consider instead using a `loop { ... }` with a `let` inside it [INFO] [stdout] = note: `#[warn(irrefutable_let_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_string_by_slash` is never used [INFO] [stdout] --> src/main.rs:180:4 [INFO] [stdout] | [INFO] [stdout] 180 | fn split_string_by_slash(input: &str) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:12:15 [INFO] [stdout] | [INFO] [stdout] 12 | while let(mut stream) = listener.accept().await? { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `end` is never read [INFO] [stdout] --> src/main.rs:183:13 [INFO] [stdout] | [INFO] [stdout] 183 | let mut end = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_string_by_slash` is never used [INFO] [stdout] --> src/main.rs:180:4 [INFO] [stdout] | [INFO] [stdout] 180 | fn split_string_by_slash(input: &str) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 13 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 13 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.52s [INFO] running `Command { std: "docker" "inspect" "4483bde4c405d1fa7aea3068c07a8a186c85ee887ef02f0dd85506f3655485c1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4483bde4c405d1fa7aea3068c07a8a186c85ee887ef02f0dd85506f3655485c1", kill_on_drop: false }` [INFO] [stdout] 4483bde4c405d1fa7aea3068c07a8a186c85ee887ef02f0dd85506f3655485c1