[INFO] cloning repository https://github.com/samuelorji/simple_http [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/samuelorji/simple_http" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamuelorji%2Fsimple_http", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamuelorji%2Fsimple_http'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d143d8382e552a7103996cf047db0007a04d0fdc [INFO] checking samuelorji/simple_http against try#b32fc44666c052e7cf07ab471bfb6f9ec571902f for pr-138676 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamuelorji%2Fsimple_http" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/samuelorji/simple_http on toolchain b32fc44666c052e7cf07ab471bfb6f9ec571902f [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b32fc44666c052e7cf07ab471bfb6f9ec571902f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/samuelorji/simple_http [INFO] finished tweaking git repo https://github.com/samuelorji/simple_http [INFO] tweaked toml for git repo https://github.com/samuelorji/simple_http written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/samuelorji/simple_http 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" "+b32fc44666c052e7cf07ab471bfb6f9ec571902f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [INFO] checking samuelorji/simple_http against try#b32fc44666c052e7cf07ab471bfb6f9ec571902f for pr-138676 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamuelorji%2Fsimple_http" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/samuelorji/simple_http on toolchain b32fc44666c052e7cf07ab471bfb6f9ec571902f [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b32fc44666c052e7cf07ab471bfb6f9ec571902f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/samuelorji/simple_http [INFO] finished tweaking git repo https://github.com/samuelorji/simple_http [INFO] tweaked toml for git repo https://github.com/samuelorji/simple_http written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/samuelorji/simple_http 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" "+b32fc44666c052e7cf07ab471bfb6f9ec571902f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/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:1680c8fbd8dfb46fcd6d22e546df16ab0e007457dc29fcd9e987cdd5077fd1af" "/opt/rustwide/cargo-home/bin/cargo" "+b32fc44666c052e7cf07ab471bfb6f9ec571902f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d2f1541585d3e60b6a403935d1a417fecb03cd6de6fe9ea977ce83fa90c01e74 [INFO] running `Command { std: "docker" "start" "-a" "d2f1541585d3e60b6a403935d1a417fecb03cd6de6fe9ea977ce83fa90c01e74", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d2f1541585d3e60b6a403935d1a417fecb03cd6de6fe9ea977ce83fa90c01e74", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2f1541585d3e60b6a403935d1a417fecb03cd6de6fe9ea977ce83fa90c01e74", kill_on_drop: false }` [INFO] [stdout] d2f1541585d3e60b6a403935d1a417fecb03cd6de6fe9ea977ce83fa90c01e74 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/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:1680c8fbd8dfb46fcd6d22e546df16ab0e007457dc29fcd9e987cdd5077fd1af" "/opt/rustwide/cargo-home/bin/cargo" "+b32fc44666c052e7cf07ab471bfb6f9ec571902f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ce6e48ad03184354ae43e9da0f203087e083ce8064bd7905785616bd26b2390f [INFO] running `Command { std: "docker" "start" "-a" "ce6e48ad03184354ae43e9da0f203087e083ce8064bd7905785616bd26b2390f", kill_on_drop: false }` [INFO] [stderr] Checking simple_http v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Display`, `Formatter`, and `format` [INFO] [stdout] --> src/main.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fmt::{Display, format, Formatter}; [INFO] [stdout] | ^^^^^^^ ^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/main.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::{Read, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Index` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ops::Index; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/http/HttpParser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:65:11 [INFO] [stdout] | [INFO] [stdout] 65 | if(*byte == 13){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 65 - if(*byte == 13){ [INFO] [stdout] 65 + if *byte == 13 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:76:11 [INFO] [stdout] | [INFO] [stdout] 76 | if(*byte == 13 && bytes[index + 2] == 13_u8){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 76 - if(*byte == 13 && bytes[index + 2] == 13_u8){ [INFO] [stdout] 76 + if *byte == 13 && bytes[index + 2] == 13_u8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | if (*byte == b' '){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 90 - if (*byte == b' '){ [INFO] [stdout] 90 + if *byte == b' ' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | if(method.is_none()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 91 - if(method.is_none()){ [INFO] [stdout] 91 + if method.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:103:7 [INFO] [stdout] | [INFO] [stdout] 103 | if(method.is_some() && path.is_some()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 103 - if(method.is_some() && path.is_some()){ [INFO] [stdout] 103 + if method.is_some() && path.is_some() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:121:11 [INFO] [stdout] | [INFO] [stdout] 121 | if(elem.is_empty()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 121 - if(elem.is_empty()){ [INFO] [stdout] 121 + if elem.is_empty() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:122:15 [INFO] [stdout] | [INFO] [stdout] 122 | if(header_end == 0){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 122 - if(header_end == 0){ [INFO] [stdout] 122 + if header_end == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:131:7 [INFO] [stdout] | [INFO] [stdout] 131 | if(stuff.len() != 3){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 131 - if(stuff.len() != 3){ [INFO] [stdout] 131 + if stuff.len() != 3 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `format` [INFO] [stdout] --> src/http/errors.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Display, format, Formatter}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/status_codes.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Display`, `Formatter`, and `format` [INFO] [stdout] --> src/main.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fmt::{Display, format, Formatter}; [INFO] [stdout] | ^^^^^^^ ^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `json` should have an upper camel case name [INFO] [stdout] --> src/http/content_types.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | json, [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Json` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `html` should have an upper camel case name [INFO] [stdout] --> src/http/content_types.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | html, [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Html` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/main.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::{Read, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Index` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ops::Index; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `text` should have an upper camel case name [INFO] [stdout] --> src/http/content_types.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | text [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Text` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `LockResult` [INFO] [stdout] --> src/threading/threadpool.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | use std::sync::{Arc, LockResult, Mutex}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/http/HttpParser.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RecvError` [INFO] [stdout] --> src/threading/threadpool.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use std::sync::mpsc::{Receiver, RecvError, Sender}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:65:11 [INFO] [stdout] | [INFO] [stdout] 65 | if(*byte == 13){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 65 - if(*byte == 13){ [INFO] [stdout] 65 + if *byte == 13 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `http::status_codes::StatusCode` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use http::status_codes::StatusCode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `http::response::HttpResponse` [INFO] [stdout] --> src/main.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use http::response::HttpResponse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:76:11 [INFO] [stdout] | [INFO] [stdout] 76 | if(*byte == 13 && bytes[index + 2] == 13_u8){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 76 - if(*byte == 13 && bytes[index + 2] == 13_u8){ [INFO] [stdout] 76 + if *byte == 13 && bytes[index + 2] == 13_u8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | if (*byte == b' '){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 90 - if (*byte == b' '){ [INFO] [stdout] 90 + if *byte == b' ' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:91:15 [INFO] [stdout] | [INFO] [stdout] 91 | if(method.is_none()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 91 - if(method.is_none()){ [INFO] [stdout] 91 + if method.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:103:7 [INFO] [stdout] | [INFO] [stdout] 103 | if(method.is_some() && path.is_some()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 103 - if(method.is_some() && path.is_some()){ [INFO] [stdout] 103 + if method.is_some() && path.is_some() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:121:11 [INFO] [stdout] | [INFO] [stdout] 121 | if(elem.is_empty()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 121 - if(elem.is_empty()){ [INFO] [stdout] 121 + if elem.is_empty() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:122:15 [INFO] [stdout] | [INFO] [stdout] 122 | if(header_end == 0){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 122 - if(header_end == 0){ [INFO] [stdout] 122 + if header_end == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/HttpParser.rs:131:7 [INFO] [stdout] | [INFO] [stdout] 131 | if(stuff.len() != 3){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 131 - if(stuff.len() != 3){ [INFO] [stdout] 131 + if stuff.len() != 3 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `format` [INFO] [stdout] --> src/http/errors.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Display, format, Formatter}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/status_codes.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `json` should have an upper camel case name [INFO] [stdout] --> src/http/content_types.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | json, [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Json` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `html` should have an upper camel case name [INFO] [stdout] --> src/http/content_types.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | html, [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Html` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `text` should have an upper camel case name [INFO] [stdout] --> src/http/content_types.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | text [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Text` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `LockResult` [INFO] [stdout] --> src/threading/threadpool.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | use std::sync::{Arc, LockResult, Mutex}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RecvError` [INFO] [stdout] --> src/threading/threadpool.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use std::sync::mpsc::{Receiver, RecvError, Sender}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `http::status_codes::StatusCode` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use http::status_codes::StatusCode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `http::response::HttpResponse` [INFO] [stdout] --> src/main.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use http::response::HttpResponse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `body_start` [INFO] [stdout] --> src/http/HttpParser.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let mut body_start = 0; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_body_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `header_string` [INFO] [stdout] --> src/http/HttpParser.rs:168:9 [INFO] [stdout] | [INFO] [stdout] 168 | let header_string :&str = &rest[..header_end].join(""); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_header_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/http/HttpParser.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | let mut body_start = 0; [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: unused variable: `body_start` [INFO] [stdout] --> src/http/HttpParser.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let mut body_start = 0; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_body_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `header_string` [INFO] [stdout] --> src/http/HttpParser.rs:168:9 [INFO] [stdout] | [INFO] [stdout] 168 | let header_string :&str = &rest[..header_end].join(""); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_header_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/http/HttpParser.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | let mut body_start = 0; [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: unreachable pattern [INFO] [stdout] --> src/http/errors.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | _ => "Nothing", [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/http/errors.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 13 | HttpParserErrors::InvalidProtocol => "Invalid Protocol", [INFO] [stdout] | --------------------------------- matches some of the same values [INFO] [stdout] 14 | HttpParserErrors::InvalidRequest => "Invalid Request", [INFO] [stdout] | -------------------------------- matches some of the same values [INFO] [stdout] 15 | HttpParserErrors::InvalidMethod => "Invalid Method", [INFO] [stdout] | ------------------------------- matches some of the same values [INFO] [stdout] 16 | _ => "Nothing", [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/http/errors.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | _ => "Nothing", [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/http/errors.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 13 | HttpParserErrors::InvalidProtocol => "Invalid Protocol", [INFO] [stdout] | --------------------------------- matches some of the same values [INFO] [stdout] 14 | HttpParserErrors::InvalidRequest => "Invalid Request", [INFO] [stdout] | -------------------------------- matches some of the same values [INFO] [stdout] 15 | HttpParserErrors::InvalidMethod => "Invalid Method", [INFO] [stdout] | ------------------------------- matches some of the same values [INFO] [stdout] 16 | _ => "Nothing", [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handler` [INFO] [stdout] --> src/main.rs:58:19 [INFO] [stdout] | [INFO] [stdout] 58 | fn run(&self, handler: impl Handler, pool: ThreadPool) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_handler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 36 | impl Server { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 37 | fn new(address: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parseToHttpRequest2` is never used [INFO] [stdout] --> src/http/HttpParser.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn parseToHttpRequest2(bytes: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `InvalidProtocol` is never constructed [INFO] [stdout] --> src/http/errors.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub enum HttpParserErrors { [INFO] [stdout] | ---------------- variant in this enum [INFO] [stdout] 4 | InvalidProtocol, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HttpParserErrors` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `query`, `headers`, and `body` are never read [INFO] [stdout] --> src/http/request.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct HttpRequest<'a> { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 7 | pub query: HashMap<&'a str, &'a str>, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 8 | pub headers: HashMap<&'a str, &'a str>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | pub body: &'a [u8] [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HttpRequest` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `HttpRequest2` is never constructed [INFO] [stdout] --> src/http/request.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct HttpRequest2<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HttpRequest2` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `InternalServerError` is never constructed [INFO] [stdout] --> src/http/status_codes.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum StatusCode { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 9 | InternalServerError = 500 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StatusCode` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `html` is never constructed [INFO] [stdout] --> src/http/content_types.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum ContentType { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] 3 | json, [INFO] [stdout] 4 | html, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ContentType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> src/threading/threadpool.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 16 | struct Worker { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 17 | id : u8, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `handleConnection` should have a snake case name [INFO] [stdout] --> src/main.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | fn handleConnection(mut stream: &mut std::net::TcpStream) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `handle_connection` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `HttpParser` should have a snake case name [INFO] [stdout] --> src/http/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub mod HttpParser; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `http_parser` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parseToHttpRequest` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn parseToHttpRequest(bytes: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `parse_to_http_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queryStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|queryStr| { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `query_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queryOpt` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | let queryOpt = item.get(1); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `query_opt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getMethodStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn getMethodStr(bytes : &[u8]) -> (&[u8], &[u8]){ [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `get_method_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getHeaderStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn getHeaderStr(bytes : &[u8]) -> (&[u8], &[u8]){ [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `get_header_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getMethodAndPath` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn getMethodAndPath(bytes : &[u8]) -> Result<(&[u8], &[u8]), HttpParserErrors>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `get_method_and_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parseToHttpRequest2` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn parseToHttpRequest2(bytes: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `parse_to_http_request2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queryStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:150:19 [INFO] [stdout] | [INFO] [stdout] 150 | .map(|queryStr| { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `query_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `statusCode` should have a snake case name [INFO] [stdout] --> src/http/response.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub statusCode : status_codes::StatusCode, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `status_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `statusCode` should have a snake case name [INFO] [stdout] --> src/http/response.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn new(statusCode : status_codes::StatusCode) -> HttpResponse<'a> { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `status_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `writeToStream` should have a snake case name [INFO] [stdout] --> src/http/response.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn writeToStream(self, stream : &mut TcpStream) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `write_to_stream` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/http/response.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | stream.write(self.serialize().as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 26 | let _ = stream.write(self.serialize().as_bytes()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fromFile` should have a snake case name [INFO] [stdout] --> src/http/response.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn fromFile(filePath : &str, content_type: ContentType) -> Self { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `from_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filePath` should have a snake case name [INFO] [stdout] --> src/http/response.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn fromFile(filePath : &str, content_type: ContentType) -> Self { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait method `handleRequest` should have a snake case name [INFO] [stdout] --> src/http/handler.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | fn handleRequest(&self, request : HttpRequest) -> HttpResponse ; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `handle_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait method `badRequest` should have a snake case name [INFO] [stdout] --> src/http/handler.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | fn badRequest(&self) -> HttpResponse { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `bad_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/threading/threadpool.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | self.sender.send(ThreadPoolMessage::Terminate); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 77 | let _ = self.sender.send(ThreadPoolMessage::Terminate); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handler` [INFO] [stdout] --> src/main.rs:58:19 [INFO] [stdout] | [INFO] [stdout] 58 | fn run(&self, handler: impl Handler, pool: ThreadPool) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_handler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 36 | impl Server { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 37 | fn new(address: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parseToHttpRequest2` is never used [INFO] [stdout] --> src/http/HttpParser.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn parseToHttpRequest2(bytes: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `InvalidProtocol` is never constructed [INFO] [stdout] --> src/http/errors.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub enum HttpParserErrors { [INFO] [stdout] | ---------------- variant in this enum [INFO] [stdout] 4 | InvalidProtocol, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HttpParserErrors` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `query`, `headers`, and `body` are never read [INFO] [stdout] --> src/http/request.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct HttpRequest<'a> { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 7 | pub query: HashMap<&'a str, &'a str>, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 8 | pub headers: HashMap<&'a str, &'a str>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | pub body: &'a [u8] [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HttpRequest` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `HttpRequest2` is never constructed [INFO] [stdout] --> src/http/request.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct HttpRequest2<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HttpRequest2` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `InternalServerError` is never constructed [INFO] [stdout] --> src/http/status_codes.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub enum StatusCode { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 9 | InternalServerError = 500 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StatusCode` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `html` is never constructed [INFO] [stdout] --> src/http/content_types.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub enum ContentType { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] 3 | json, [INFO] [stdout] 4 | html, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ContentType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `id` is never read [INFO] [stdout] --> src/threading/threadpool.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 16 | struct Worker { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 17 | id : u8, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `handleConnection` should have a snake case name [INFO] [stdout] --> src/main.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | fn handleConnection(mut stream: &mut std::net::TcpStream) -> () { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `handle_connection` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `HttpParser` should have a snake case name [INFO] [stdout] --> src/http/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | pub mod HttpParser; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `http_parser` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parseToHttpRequest` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn parseToHttpRequest(bytes: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `parse_to_http_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queryStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|queryStr| { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `query_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queryOpt` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | let queryOpt = item.get(1); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `query_opt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getMethodStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn getMethodStr(bytes : &[u8]) -> (&[u8], &[u8]){ [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `get_method_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getHeaderStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn getHeaderStr(bytes : &[u8]) -> (&[u8], &[u8]){ [INFO] [stdout] | ^^^^^^^^^^^^ help: convert the identifier to snake case: `get_header_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `getMethodAndPath` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn getMethodAndPath(bytes : &[u8]) -> Result<(&[u8], &[u8]), HttpParserErrors>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `get_method_and_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parseToHttpRequest2` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn parseToHttpRequest2(bytes: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `parse_to_http_request2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queryStr` should have a snake case name [INFO] [stdout] --> src/http/HttpParser.rs:150:19 [INFO] [stdout] | [INFO] [stdout] 150 | .map(|queryStr| { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `query_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `statusCode` should have a snake case name [INFO] [stdout] --> src/http/response.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub statusCode : status_codes::StatusCode, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `status_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `statusCode` should have a snake case name [INFO] [stdout] --> src/http/response.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn new(statusCode : status_codes::StatusCode) -> HttpResponse<'a> { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `status_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `writeToStream` should have a snake case name [INFO] [stdout] --> src/http/response.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn writeToStream(self, stream : &mut TcpStream) { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `write_to_stream` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/http/response.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | stream.write(self.serialize().as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 26 | let _ = stream.write(self.serialize().as_bytes()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fromFile` should have a snake case name [INFO] [stdout] --> src/http/response.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn fromFile(filePath : &str, content_type: ContentType) -> Self { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `from_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `filePath` should have a snake case name [INFO] [stdout] --> src/http/response.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn fromFile(filePath : &str, content_type: ContentType) -> Self { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `file_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait method `handleRequest` should have a snake case name [INFO] [stdout] --> src/http/handler.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | fn handleRequest(&self, request : HttpRequest) -> HttpResponse ; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `handle_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait method `badRequest` should have a snake case name [INFO] [stdout] --> src/http/handler.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | fn badRequest(&self) -> HttpResponse { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `bad_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/threading/threadpool.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | self.sender.send(ThreadPoolMessage::Terminate); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 77 | let _ = self.sender.send(ThreadPoolMessage::Terminate); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s [INFO] running `Command { std: "docker" "inspect" "ce6e48ad03184354ae43e9da0f203087e083ce8064bd7905785616bd26b2390f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ce6e48ad03184354ae43e9da0f203087e083ce8064bd7905785616bd26b2390f", kill_on_drop: false }` [INFO] [stdout] ce6e48ad03184354ae43e9da0f203087e083ce8064bd7905785616bd26b2390f