[INFO] cloning repository https://github.com/malandrakisgeo/RustWebServer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/malandrakisgeo/RustWebServer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmalandrakisgeo%2FRustWebServer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmalandrakisgeo%2FRustWebServer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ad475dbab171c98c95198ea2a19c8ab3fd0c23c4 [INFO] checking malandrakisgeo/RustWebServer against master#8424f8e8cdf07010967a57584fd647b30e930d4d for pr-120095 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmalandrakisgeo%2FRustWebServer" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/malandrakisgeo/RustWebServer on toolchain 8424f8e8cdf07010967a57584fd647b30e930d4d [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8424f8e8cdf07010967a57584fd647b30e930d4d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/malandrakisgeo/RustWebServer [INFO] finished tweaking git repo https://github.com/malandrakisgeo/RustWebServer [INFO] tweaked toml for git repo https://github.com/malandrakisgeo/RustWebServer written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/malandrakisgeo/RustWebServer 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" "+8424f8e8cdf07010967a57584fd647b30e930d4d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [ERROR] this task or one of its parent failed! [ERROR] no output for 300 seconds [ERROR] note: run with `RUST_BACKTRACE=1` to display a backtrace. [INFO] checking malandrakisgeo/RustWebServer against try#047472f299946caf090d1b5608ae4bd9f0416256+rustflags=-Ddereferencing_mut_binding for pr-120095 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmalandrakisgeo%2FRustWebServer" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/malandrakisgeo/RustWebServer on toolchain 047472f299946caf090d1b5608ae4bd9f0416256 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+047472f299946caf090d1b5608ae4bd9f0416256" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/malandrakisgeo/RustWebServer [INFO] finished tweaking git repo https://github.com/malandrakisgeo/RustWebServer [INFO] tweaked toml for git repo https://github.com/malandrakisgeo/RustWebServer written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/malandrakisgeo/RustWebServer 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" "+047472f299946caf090d1b5608ae4bd9f0416256" "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-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+047472f299946caf090d1b5608ae4bd9f0416256" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 238d1d40c40ea558dfe2a7d48d2bd9dde34a1f900e7fd3e62667bb5c766ac940 [INFO] running `Command { std: "docker" "start" "-a" "238d1d40c40ea558dfe2a7d48d2bd9dde34a1f900e7fd3e62667bb5c766ac940", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "238d1d40c40ea558dfe2a7d48d2bd9dde34a1f900e7fd3e62667bb5c766ac940", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "238d1d40c40ea558dfe2a7d48d2bd9dde34a1f900e7fd3e62667bb5c766ac940", kill_on_drop: false }` [INFO] [stdout] 238d1d40c40ea558dfe2a7d48d2bd9dde34a1f900e7fd3e62667bb5c766ac940 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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 -Ddereferencing_mut_binding" "-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" "+047472f299946caf090d1b5608ae4bd9f0416256" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 3d921aed54fe0051df4050cd107e5b6a9199d7f961b529478d406765ed780883 [INFO] running `Command { std: "docker" "start" "-a" "3d921aed54fe0051df4050cd107e5b6a9199d7f961b529478d406765ed780883", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.1.0 [INFO] [stderr] Compiling libc v0.2.149 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking bitflags v2.4.1 [INFO] [stderr] Checking iana-time-zone v0.1.58 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking urlencoding v2.1.3 [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Checking chrono v0.4.31 [INFO] [stderr] Checking nix v0.27.1 [INFO] [stderr] Checking ctrlc v3.4.2 [INFO] [stderr] Checking RustWebServer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/core/server_cache.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | if(MAX_CACHE_FILES == 0 || MAX_FILE_SIZE == 0){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 22 - if(MAX_CACHE_FILES == 0 || MAX_FILE_SIZE == 0){ [INFO] [stdout] 22 + if MAX_CACHE_FILES == 0 || MAX_FILE_SIZE == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/logger/refera_logger.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/core/server_cache.rs:22:11 [INFO] [stdout] | [INFO] [stdout] 22 | if(MAX_CACHE_FILES == 0 || MAX_FILE_SIZE == 0){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 22 - if(MAX_CACHE_FILES == 0 || MAX_FILE_SIZE == 0){ [INFO] [stdout] 22 + if MAX_CACHE_FILES == 0 || MAX_FILE_SIZE == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/logger/refera_logger.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/response/refera_error.rs:29:45 [INFO] [stdout] | [INFO] [stdout] 29 | ReferaError::Io(ref err) => err.description(), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/response/refera_error.rs:29:45 [INFO] [stdout] | [INFO] [stdout] 29 | ReferaError::Io(ref err) => err.description(), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `headers` [INFO] [stdout] --> src/response/refera_response.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | let headers: Vec = self.headers.clone().into_iter() [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/response/refera_response.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | let headers: Vec = self.headers.clone().into_iter() [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: variable does not need to be mutable [INFO] [stdout] --> src/core/server_cache.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | let mut cache = FILE_CACHE.acquire_mut(); [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/core/server_cache.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | let mut cache = FILE_CACHE.acquire_mut(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/content_manager/content_parser.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | Err(err) => Vec::new() [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/content_manager/content_parser.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let mut ve: Vec; [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `file` is never read [INFO] [stdout] --> src/content_manager/content_parser.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | let mut file: Vec = Vec::new(); [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: unnecessary `unsafe` block [INFO] [stdout] --> src/logger/refera_logger.rs:22:71 [INFO] [stdout] | [INFO] [stdout] 22 | static mut COMMON_BUFFER: Lazy>> = Lazy::new(|| unsafe { [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_unsafe)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/logger/refera_logger.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | let mut buf = COMMON_BUFFER.acquire_mut(); [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/logger/refera_logger.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | let mut buffer = COMMON_BUFFER.acquire_mut(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `headers` [INFO] [stdout] --> src/main.rs:73:25 [INFO] [stdout] | [INFO] [stdout] 73 | fn get_reply(url: &str, headers: HashMap) -> ReferaResponse { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_headers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_str` is never used [INFO] [stdout] --> src/response/refera_response.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl ReferaResponse { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn as_str(&self) -> String { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Informational`, `Success`, `Redirection`, `ClientError`, `ServerError`, and `Unknown` are never constructed [INFO] [stdout] --> src/http/http_status.rs:207:5 [INFO] [stdout] | [INFO] [stdout] 205 | pub enum StatusClass { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 206 | /// 1xx Informational [INFO] [stdout] 207 | Informational, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 210 | Success, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 213 | Redirection, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 216 | ClientError, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 219 | ServerError, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 222 | Unknown, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StatusClass` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `class` is never used [INFO] [stdout] --> src/http/http_status.rs:368:12 [INFO] [stdout] | [INFO] [stdout] 225 | impl StatusCode { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 368 | pub fn class(&self) -> StatusClass { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `write_to_file` is never used [INFO] [stdout] --> src/logger/refera_logger.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn write_to_file() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate `RustWebServer` should have a snake case name [INFO] [stdout] | [INFO] [stdout] = help: convert the identifier to snake case: `rust_web_server` [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type [INFO] [stdout] --> src/main.rs:54:27 [INFO] [stdout] | [INFO] [stdout] 54 | println!("{}", req_url.clone()); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / log_request(request.peer_addr().unwrap(), http_method, req_url, [INFO] [stdout] 57 | | user_agent); [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] 56 | let _ = log_request(request.peer_addr().unwrap(), http_method, req_url, [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 61 | let _ = &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 70 | let _ = &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/core/server_cache.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | let mut cache = FILE_CACHE.acquire_mut(); [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/core/server_cache.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | let mut cache = FILE_CACHE.acquire_mut(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/content_manager/content_parser.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | Err(err) => Vec::new() [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/content_manager/content_parser.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let mut ve: Vec; [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 22 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `file` is never read [INFO] [stdout] --> src/content_manager/content_parser.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | let mut file: Vec = Vec::new(); [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: unnecessary `unsafe` block [INFO] [stdout] --> src/logger/refera_logger.rs:22:71 [INFO] [stdout] | [INFO] [stdout] 22 | static mut COMMON_BUFFER: Lazy>> = Lazy::new(|| unsafe { [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_unsafe)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/logger/refera_logger.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | let mut buf = COMMON_BUFFER.acquire_mut(); [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/logger/refera_logger.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | let mut buffer = COMMON_BUFFER.acquire_mut(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `headers` [INFO] [stdout] --> src/main.rs:73:25 [INFO] [stdout] | [INFO] [stdout] 73 | fn get_reply(url: &str, headers: HashMap) -> ReferaResponse { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_headers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_str` is never used [INFO] [stdout] --> src/response/refera_response.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl ReferaResponse { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn as_str(&self) -> String { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Informational`, `Success`, `Redirection`, `ClientError`, `ServerError`, and `Unknown` are never constructed [INFO] [stdout] --> src/http/http_status.rs:207:5 [INFO] [stdout] | [INFO] [stdout] 205 | pub enum StatusClass { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 206 | /// 1xx Informational [INFO] [stdout] 207 | Informational, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 210 | Success, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 213 | Redirection, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 216 | ClientError, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 219 | ServerError, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 222 | Unknown, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StatusClass` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `class` is never used [INFO] [stdout] --> src/http/http_status.rs:368:12 [INFO] [stdout] | [INFO] [stdout] 225 | impl StatusCode { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 368 | pub fn class(&self) -> StatusClass { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `write_to_file` is never used [INFO] [stdout] --> src/logger/refera_logger.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn write_to_file() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate `RustWebServer` should have a snake case name [INFO] [stdout] | [INFO] [stdout] = help: convert the identifier to snake case: `rust_web_server` [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type [INFO] [stdout] --> src/main.rs:54:27 [INFO] [stdout] | [INFO] [stdout] 54 | println!("{}", req_url.clone()); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / log_request(request.peer_addr().unwrap(), http_method, req_url, [INFO] [stdout] 57 | | user_agent); [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] 56 | let _ = log_request(request.peer_addr().unwrap(), http_method, req_url, [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 61 | let _ = &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 70 | let _ = &request.write_all(resp.as_u8().as_slice()).unwrap(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 22 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.47s [INFO] running `Command { std: "docker" "inspect" "3d921aed54fe0051df4050cd107e5b6a9199d7f961b529478d406765ed780883", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3d921aed54fe0051df4050cd107e5b6a9199d7f961b529478d406765ed780883", kill_on_drop: false }` [INFO] [stdout] 3d921aed54fe0051df4050cd107e5b6a9199d7f961b529478d406765ed780883