[INFO] cloning repository https://github.com/thomas-gleizes/kttp [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/thomas-gleizes/kttp" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fthomas-gleizes%2Fkttp", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fthomas-gleizes%2Fkttp'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1e4b9844c86177dd94246149a7bfdf9aea4ce935 [INFO] checking thomas-gleizes/kttp/1e4b9844c86177dd94246149a7bfdf9aea4ce935 against try#afeffcd090fe6cee35c99f8b5539d74aa443fe34 for pr-140956 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fthomas-gleizes%2Fkttp" "/workspace/builds/worker-1-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/thomas-gleizes/kttp [INFO] finished tweaking git repo https://github.com/thomas-gleizes/kttp [INFO] tweaked toml for git repo https://github.com/thomas-gleizes/kttp written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/thomas-gleizes/kttp on toolchain afeffcd090fe6cee35c99f8b5539d74aa443fe34 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+afeffcd090fe6cee35c99f8b5539d74aa443fe34" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/thomas-gleizes/kttp 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" "+afeffcd090fe6cee35c99f8b5539d74aa443fe34" "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-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+afeffcd090fe6cee35c99f8b5539d74aa443fe34" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 15d86fb11ef84e1f2a4b7f0d70872c99ec9131f0480da3e64bd90456dd0465d0 [INFO] running `Command { std: "docker" "start" "-a" "15d86fb11ef84e1f2a4b7f0d70872c99ec9131f0480da3e64bd90456dd0465d0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "15d86fb11ef84e1f2a4b7f0d70872c99ec9131f0480da3e64bd90456dd0465d0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "15d86fb11ef84e1f2a4b7f0d70872c99ec9131f0480da3e64bd90456dd0465d0", kill_on_drop: false }` [INFO] [stdout] 15d86fb11ef84e1f2a4b7f0d70872c99ec9131f0480da3e64bd90456dd0465d0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+afeffcd090fe6cee35c99f8b5539d74aa443fe34" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 55cc9736d6544a7fe459c08136ffc611ed49b9e725bffa2b8f185c58666e6392 [INFO] running `Command { std: "docker" "start" "-a" "55cc9736d6544a7fe459c08136ffc611ed49b9e725bffa2b8f185c58666e6392", kill_on_drop: false }` [INFO] [stderr] Checking kttp v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `crate::http::status_code::StatusCode` [INFO] [stdout] --> src/http/request.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::http::status_code::StatusCode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/http/request.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/server.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if (self.routes.get(path).is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 59 - if (self.routes.get(path).is_none()) { [INFO] [stdout] 59 + if self.routes.get(path).is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::http::status_code::StatusCode` [INFO] [stdout] --> src/http/request.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::http::status_code::StatusCode; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/http/request.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/http/server.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if (self.routes.get(path).is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 59 - if (self.routes.get(path).is_none()) { [INFO] [stdout] 59 + if self.routes.get(path).is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `headers` [INFO] [stdout] --> src/http/request.rs:21:28 [INFO] [stdout] | [INFO] [stdout] 21 | let (method, path, headers) = Self::parse_content(content.clone()); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_headers` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `headers` [INFO] [stdout] --> src/http/request.rs:21:28 [INFO] [stdout] | [INFO] [stdout] 21 | let (method, path, headers) = Self::parse_content(content.clone()); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_headers` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `method` [INFO] [stdout] --> src/http/server.rs:57:40 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_method` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handler` [INFO] [stdout] --> src/http/server.rs:57:56 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_handler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `method` [INFO] [stdout] --> src/http/server.rs:57:40 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_method` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handler` [INFO] [stdout] --> src/http/server.rs:57:56 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_handler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `request` [INFO] [stdout] --> src/main.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let request = Request::new(&mut stream); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `request` [INFO] [stdout] --> src/main.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let request = Request::new(&mut stream); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_request` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::get` [INFO] [stdout] --> src/http/server.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn get(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::get` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::post` [INFO] [stdout] --> src/http/server.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn post(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::post` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::put` [INFO] [stdout] --> src/http/server.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn put(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::put` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::delete` [INFO] [stdout] --> src/http/server.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn delete(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::delete` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::get` [INFO] [stdout] --> src/http/server.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn get(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::get` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::patch` [INFO] [stdout] --> src/http/server.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | pub fn patch(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::patch` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::route` [INFO] [stdout] --> src/http/server.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::route` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `handle_client` is never used [INFO] [stdout] --> src/main.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn handle_client(mut stream: TcpStream) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::post` [INFO] [stdout] --> src/http/server.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn post(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::post` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `headers` is never read [INFO] [stdout] --> src/http/headers.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Headers { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 4 | headers: HashMap, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add`, `get`, and `to_string` are never used [INFO] [stdout] --> src/http/headers.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl Headers { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 8 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | pub fn add(&mut self, key: String, value: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn get(&self, key: &str) -> Option<&String> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn to_string(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::put` [INFO] [stdout] --> src/http/server.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn put(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::put` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::delete` [INFO] [stdout] --> src/http/server.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn delete(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::delete` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> src/http/method.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | pub enum Method { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 2 | Get, [INFO] [stdout] | ^^^ [INFO] [stdout] 3 | Post, [INFO] [stdout] | ^^^^ [INFO] [stdout] 4 | Put, [INFO] [stdout] | ^^^ [INFO] [stdout] 5 | Delete, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 6 | Patch, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 7 | Head, [INFO] [stdout] | ^^^^ [INFO] [stdout] 8 | Options, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_str` is never used [INFO] [stdout] --> src/http/method.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Method { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 12 | pub fn as_str(&self) -> &str { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::patch` [INFO] [stdout] --> src/http/server.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | pub fn patch(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::patch` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `ip_addr`, `headers`, `method`, `path`, `stream`, and `content` are never read [INFO] [stdout] --> src/http/request.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Request { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 9 | pub ip_addr: IpAddr, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 10 | pub headers: Headers, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 11 | pub method: Method, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 12 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 13 | [INFO] [stdout] 14 | stream: TcpStream, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 15 | content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new`, `read_content`, and `parse_content` are never used [INFO] [stdout] --> src/http/request.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Request { [INFO] [stdout] | ------------ associated functions in this implementation [INFO] [stdout] 19 | pub fn new(stream: &mut TcpStream) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn read_content(stream: &mut TcpStream) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn parse_content(content: String) -> (Method, String, Headers) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `HttpContext` is more private than the item `Server::route` [INFO] [stdout] --> src/http/server.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `Server::route` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `HttpContext` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/http/server.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `status`, `headers`, and `stream` are never read [INFO] [stdout] --> src/http/response.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Response { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 7 | status: StatusCode, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 8 | headers: Headers, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | [INFO] [stdout] 10 | stream: TcpStream, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `handle_client` is never used [INFO] [stdout] --> src/main.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn handle_client(mut stream: TcpStream) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `status`, `headers`, `add_header`, and `send` are never used [INFO] [stdout] --> src/http/response.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Response { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 14 | pub fn new(stream: TcpStream) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn status(&mut self, status: StatusCode) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn headers(&self) -> &Headers { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn add_header(&mut self, key: String, value: String) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn send(&mut self, content: String) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `request` and `response` are never read [INFO] [stdout] --> src/http/server.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 11 | pub request: Request, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 12 | pub response: Response, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `headers` is never read [INFO] [stdout] --> src/http/headers.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Headers { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 4 | headers: HashMap, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `method` and `handler` are never read [INFO] [stdout] --> src/http/server.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 15 | struct Route { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 16 | method: Method, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 17 | handler: Handler, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `routes` is never read [INFO] [stdout] --> src/http/server.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 20 | pub struct Server { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 24 | routes: HashMap>, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get`, `post`, `put`, `delete`, `patch`, and `route` are never used [INFO] [stdout] --> src/http/server.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl Server { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn get(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn post(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn put(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn delete(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn patch(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add`, `get`, and `to_string` are never used [INFO] [stdout] --> src/http/headers.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl Headers { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 8 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | pub fn add(&mut self, key: String, value: String) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn get(&self, key: &str) -> Option<&String> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn to_string(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/http/status_code.rs:5:15 [INFO] [stdout] | [INFO] [stdout] 4 | impl StatusCode { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 5 | pub const CONTINUE: StatusCode = StatusCode(100); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 6 | pub const OK: StatusCode = StatusCode(200); [INFO] [stdout] | ^^ [INFO] [stdout] 7 | pub const CREATED: StatusCode = StatusCode(201); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 8 | pub const NO_CONTENT: StatusCode = StatusCode(204); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub const MOVED_PERMANENTLY: StatusCode = StatusCode(301); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 10 | pub const FOUND: StatusCode = StatusCode(302); [INFO] [stdout] | ^^^^^ [INFO] [stdout] 11 | pub const BAD_REQUEST: StatusCode = StatusCode(400); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 12 | pub const UNAUTHORIZED: StatusCode = StatusCode(401); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 13 | pub const FORBIDDEN: StatusCode = StatusCode(403); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 14 | pub const NOT_FOUND: StatusCode = StatusCode(404); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 15 | pub const INTERNAL_SERVER_ERROR: StatusCode = StatusCode(500); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 16 | [INFO] [stdout] 17 | pub fn new(code: u16) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn to_u16(&self) -> u16 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn message(&self) -> &'static str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `standard_message` is never used [INFO] [stdout] --> src/http/status_code.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn standard_message(code: u16) -> &'static str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> src/http/method.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | pub enum Method { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 2 | Get, [INFO] [stdout] | ^^^ [INFO] [stdout] 3 | Post, [INFO] [stdout] | ^^^^ [INFO] [stdout] 4 | Put, [INFO] [stdout] | ^^^ [INFO] [stdout] 5 | Delete, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 6 | Patch, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 7 | Head, [INFO] [stdout] | ^^^^ [INFO] [stdout] 8 | Options, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_str` is never used [INFO] [stdout] --> src/http/method.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Method { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 12 | pub fn as_str(&self) -> &str { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `ip_addr`, `headers`, `method`, `path`, `stream`, and `content` are never read [INFO] [stdout] --> src/http/request.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Request { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 9 | pub ip_addr: IpAddr, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 10 | pub headers: Headers, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 11 | pub method: Method, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 12 | pub path: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 13 | [INFO] [stdout] 14 | stream: TcpStream, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 15 | content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new`, `read_content`, and `parse_content` are never used [INFO] [stdout] --> src/http/request.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Request { [INFO] [stdout] | ------------ associated functions in this implementation [INFO] [stdout] 19 | pub fn new(stream: &mut TcpStream) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn read_content(stream: &mut TcpStream) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn parse_content(content: String) -> (Method, String, Headers) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `status`, `headers`, and `stream` are never read [INFO] [stdout] --> src/http/response.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Response { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 7 | status: StatusCode, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 8 | headers: Headers, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | [INFO] [stdout] 10 | stream: TcpStream, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `status`, `headers`, `add_header`, and `send` are never used [INFO] [stdout] --> src/http/response.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Response { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 14 | pub fn new(stream: TcpStream) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn status(&mut self, status: StatusCode) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn headers(&self) -> &Headers { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn add_header(&mut self, key: String, value: String) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn send(&mut self, content: String) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `request` and `response` are never read [INFO] [stdout] --> src/http/server.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 10 | struct HttpContext { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 11 | pub request: Request, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 12 | pub response: Response, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `method` and `handler` are never read [INFO] [stdout] --> src/http/server.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 15 | struct Route { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 16 | method: Method, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 17 | handler: Handler, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `routes` is never read [INFO] [stdout] --> src/http/server.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 20 | pub struct Server { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 24 | routes: HashMap>, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get`, `post`, `put`, `delete`, `patch`, and `route` are never used [INFO] [stdout] --> src/http/server.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl Server { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn get(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn post(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn put(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn delete(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn patch(self, path: &str, handler: Handler) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 57 | pub fn route(mut self, path: &str, method: Method, handler: Handler) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/http/status_code.rs:5:15 [INFO] [stdout] | [INFO] [stdout] 4 | impl StatusCode { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 5 | pub const CONTINUE: StatusCode = StatusCode(100); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 6 | pub const OK: StatusCode = StatusCode(200); [INFO] [stdout] | ^^ [INFO] [stdout] 7 | pub const CREATED: StatusCode = StatusCode(201); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 8 | pub const NO_CONTENT: StatusCode = StatusCode(204); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub const MOVED_PERMANENTLY: StatusCode = StatusCode(301); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 10 | pub const FOUND: StatusCode = StatusCode(302); [INFO] [stdout] | ^^^^^ [INFO] [stdout] 11 | pub const BAD_REQUEST: StatusCode = StatusCode(400); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 12 | pub const UNAUTHORIZED: StatusCode = StatusCode(401); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 13 | pub const FORBIDDEN: StatusCode = StatusCode(403); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 14 | pub const NOT_FOUND: StatusCode = StatusCode(404); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 15 | pub const INTERNAL_SERVER_ERROR: StatusCode = StatusCode(500); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 16 | [INFO] [stdout] 17 | pub fn new(code: u16) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn to_u16(&self) -> u16 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn message(&self) -> &'static str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `standard_message` is never used [INFO] [stdout] --> src/http/status_code.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn standard_message(code: u16) -> &'static str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s [INFO] running `Command { std: "docker" "inspect" "55cc9736d6544a7fe459c08136ffc611ed49b9e725bffa2b8f185c58666e6392", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "55cc9736d6544a7fe459c08136ffc611ed49b9e725bffa2b8f185c58666e6392", kill_on_drop: false }` [INFO] [stdout] 55cc9736d6544a7fe459c08136ffc611ed49b9e725bffa2b8f185c58666e6392