[INFO] cloning repository https://github.com/mouhamedsylla/localhost [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mouhamedsylla/localhost" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmouhamedsylla%2Flocalhost", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmouhamedsylla%2Flocalhost'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 57635194b6344ddb247bbe3c98df32d0a55bbc0a [INFO] linting mouhamedsylla/localhost against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmouhamedsylla%2Flocalhost" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mouhamedsylla/localhost [INFO] removed 1 missing tests [INFO] finished tweaking git repo https://github.com/mouhamedsylla/localhost [INFO] tweaked toml for git repo https://github.com/mouhamedsylla/localhost written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mouhamedsylla/localhost on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/mouhamedsylla/localhost 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" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tabwriter v1.4.1 [INFO] [stderr] Downloaded serde v1.0.216 [INFO] [stderr] Downloaded uuid v1.12.0 [INFO] [stderr] Downloaded unicase v2.8.0 [INFO] [stderr] Downloaded dialoguer v0.11.0 [INFO] [stderr] Downloaded serde_derive v1.0.216 [INFO] [stderr] Downloaded cc v1.2.5 [INFO] [stderr] Downloaded zerocopy-derive v0.8.21 [INFO] [stderr] Downloaded zerocopy v0.8.21 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d1ce75c03afec7700c6936a631ac44fb3f12fe305e3770648906f8810c181ff2 [INFO] running `Command { std: "docker" "start" "-a" "d1ce75c03afec7700c6936a631ac44fb3f12fe305e3770648906f8810c181ff2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d1ce75c03afec7700c6936a631ac44fb3f12fe305e3770648906f8810c181ff2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d1ce75c03afec7700c6936a631ac44fb3f12fe305e3770648906f8810c181ff2", kill_on_drop: false }` [INFO] [stdout] d1ce75c03afec7700c6936a631ac44fb3f12fe305e3770648906f8810c181ff2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b9503296ab0843e7ef71d23ac4a4cd8ff31caf9bd46117f45b58b20f37a3edfd [INFO] running `Command { std: "docker" "start" "-a" "b9503296ab0843e7ef71d23ac4a4cd8ff31caf9bd46117f45b58b20f37a3edfd", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.168 [INFO] [stderr] Compiling getrandom v0.3.1 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Compiling unicase v2.8.0 [INFO] [stderr] Compiling portable-atomic v1.11.0 [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Compiling serde v1.0.216 [INFO] [stderr] Compiling zerocopy v0.8.21 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Compiling serde_json v1.0.133 [INFO] [stderr] Checking clap_builder v4.5.31 [INFO] [stderr] Checking shell-words v1.1.0 [INFO] [stderr] Checking number_prefix v0.4.0 [INFO] [stderr] Checking colored v2.2.0 [INFO] [stderr] Checking chrono v0.4.39 [INFO] [stderr] Checking tabwriter v1.4.1 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking uuid v1.12.0 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking tempfile v3.17.1 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling serde_derive v1.0.216 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling clap_derive v4.5.28 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking dialoguer v0.11.0 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking clap v4.5.31 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.0 [INFO] [stderr] Checking localhost v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `ContentType`, `HeaderName`, `HeaderParsedValue`, and `HeaderValue` [INFO] [stdout] --> src/http/response.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::http::header::{HeaderName, HeaderValue, HeaderParsedValue, ContentType, Cookie, CookieOptions}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `FormUrlEncoded` [INFO] [stdout] --> src/http/request.rs:2:31 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::http::body::{Body, FormUrlEncoded, BodyError}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HeaderParsedValue` and `HeaderValue` [INFO] [stdout] --> src/http/request.rs:3:39 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::http::header::{HeaderName, HeaderParsedValue, HeaderValue, ContentType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/http/header.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/header.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HeaderName`, `HeaderParsedValue`, `HeaderValue`, and `Header` [INFO] [stdout] --> src/http/header.rs:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | pub use super::{Header, HeaderValue, HeaderName, HeaderParsedValue}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/header.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ContentType`, `ParsedContentDisposition`, and `ParsedContentType` [INFO] [stdout] --> src/http/header.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | pub use super::{ParsedContentType, ParsedContentDisposition, ContentType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/header.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `CookieOptions`, `Cookie`, and `SameSitePolicy` [INFO] [stdout] --> src/http/header.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | pub use super::{Cookie, CookieOptions, SameSitePolicy}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParsedContentType` [INFO] [stdout] --> src/http/body.rs:6:53 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::http::header::{ParsedContentDisposition, ParsedContentType, Header, HeaderName, ContentType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/http/status.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SessionError` [INFO] [stdout] --> src/server/server.rs:19:40 [INFO] [stdout] | [INFO] [stdout] 19 | use crate::server::errors::{HttpError, SessionError}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SessionError` [INFO] [stdout] --> src/server/host.rs:24:40 [INFO] [stdout] | [INFO] [stdout] 24 | use crate::server::errors::{HttpError, SessionError}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `mime` should have an upper camel case name [INFO] [stdout] --> src/server/static_files.rs:15:10 [INFO] [stdout] | [INFO] [stdout] 15 | pub type mime = String; [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Mime` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PathBuf` [INFO] [stdout] --> src/server/cgi.rs:8:23 [INFO] [stdout] | [INFO] [stdout] 8 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/server/cgi.rs:106:12 [INFO] [stdout] | [INFO] [stdout] 106 | if (!script_path.exists()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 106 - if (!script_path.exists()) { [INFO] [stdout] 106 + if !script_path.exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/server/cgi.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | if (!self.is_allowed_extension(script_path)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 110 - if (!self.is_allowed_extension(script_path)) { [INFO] [stdout] 110 + if !self.is_allowed_extension(script_path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HttpError` [INFO] [stdout] --> src/server/handlers.rs:33:50 [INFO] [stdout] | [INFO] [stdout] 33 | use crate::server::errors::{ServerError, HttpError}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Session` [INFO] [stdout] --> src/server/handlers.rs:314:47 [INFO] [stdout] | [INFO] [stdout] 314 | use crate::server::session::session::{Session, SessionManager}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SessionError` [INFO] [stdout] --> src/server/handlers.rs:324:61 [INFO] [stdout] | [INFO] [stdout] 324 | use crate::server::errors::{ServerError, HttpError, SessionError}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/server/uploader.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | if (!self.is_allowed_mime_type(mime_type)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 121 - if (!self.is_allowed_mime_type(mime_type)) { [INFO] [stdout] 121 + if !self.is_allowed_mime_type(mime_type) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ContentType`, `HeaderName`, `HeaderParsedValue`, and `HeaderValue` [INFO] [stdout] --> src/http/response.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::http::header::{HeaderName, HeaderValue, HeaderParsedValue, ContentType, Cookie, CookieOptions}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `FormUrlEncoded` [INFO] [stdout] --> src/http/request.rs:2:31 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::http::body::{Body, FormUrlEncoded, BodyError}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HeaderParsedValue` and `HeaderValue` [INFO] [stdout] --> src/http/request.rs:3:39 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::http::header::{HeaderName, HeaderParsedValue, HeaderValue, ContentType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/http/header.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/header.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HeaderName`, `HeaderParsedValue`, `HeaderValue`, and `Header` [INFO] [stdout] --> src/http/header.rs:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | pub use super::{Header, HeaderValue, HeaderName, HeaderParsedValue}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/header.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ContentType`, `ParsedContentDisposition`, and `ParsedContentType` [INFO] [stdout] --> src/http/header.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | pub use super::{ParsedContentType, ParsedContentDisposition, ContentType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/http/header.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `CookieOptions`, `Cookie`, and `SameSitePolicy` [INFO] [stdout] --> src/http/header.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | pub use super::{Cookie, CookieOptions, SameSitePolicy}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ParsedContentType` [INFO] [stdout] --> src/http/body.rs:6:53 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::http::header::{ParsedContentDisposition, ParsedContentType, Header, HeaderName, ContentType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/http/status.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SessionError` [INFO] [stdout] --> src/server/server.rs:19:40 [INFO] [stdout] | [INFO] [stdout] 19 | use crate::server::errors::{HttpError, SessionError}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SessionError` [INFO] [stdout] --> src/server/host.rs:24:40 [INFO] [stdout] | [INFO] [stdout] 24 | use crate::server::errors::{HttpError, SessionError}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `mime` should have an upper camel case name [INFO] [stdout] --> src/server/static_files.rs:15:10 [INFO] [stdout] | [INFO] [stdout] 15 | pub type mime = String; [INFO] [stdout] | ^^^^ help: convert the identifier to upper camel case: `Mime` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PathBuf` [INFO] [stdout] --> src/server/cgi.rs:8:23 [INFO] [stdout] | [INFO] [stdout] 8 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/server/cgi.rs:106:12 [INFO] [stdout] | [INFO] [stdout] 106 | if (!script_path.exists()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 106 - if (!script_path.exists()) { [INFO] [stdout] 106 + if !script_path.exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/server/cgi.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | if (!self.is_allowed_extension(script_path)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 110 - if (!self.is_allowed_extension(script_path)) { [INFO] [stdout] 110 + if !self.is_allowed_extension(script_path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HttpError` [INFO] [stdout] --> src/server/handlers.rs:33:50 [INFO] [stdout] | [INFO] [stdout] 33 | use crate::server::errors::{ServerError, HttpError}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Session` [INFO] [stdout] --> src/server/handlers.rs:314:47 [INFO] [stdout] | [INFO] [stdout] 314 | use crate::server::session::session::{Session, SessionManager}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SessionError` [INFO] [stdout] --> src/server/handlers.rs:324:61 [INFO] [stdout] | [INFO] [stdout] 324 | use crate::server::errors::{ServerError, HttpError, SessionError}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/server/uploader.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | if (!self.is_allowed_mime_type(mime_type)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 121 - if (!self.is_allowed_mime_type(mime_type)) { [INFO] [stdout] 121 + if !self.is_allowed_mime_type(mime_type) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/http/response.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | let mut headers = vec![ [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/http/response.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | let mut headers = vec![ [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/http/body.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | let mut pos = 0; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/http/body.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | let mut pos = 0; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/server/server.rs:164:53 [INFO] [stdout] | [INFO] [stdout] 164 | ... if let Some(s) = session { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `should_close` is never read [INFO] [stdout] --> src/server/server.rs:171:49 [INFO] [stdout] | [INFO] [stdout] 171 | ... should_close = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `should_close` is never read [INFO] [stdout] --> src/server/server.rs:219:45 [INFO] [stdout] | [INFO] [stdout] 219 | ... should_close = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `should_close` is never read [INFO] [stdout] --> src/server/server.rs:239:34 [INFO] [stdout] | [INFO] [stdout] 239 | ... should_close = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/http/response.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | let mut headers = vec![ [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/http/response.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | let mut headers = vec![ [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/server/static_files.rs:133:23 [INFO] [stdout] | [INFO] [stdout] 133 | .map_err(|e| ServerError::FileNotFound(path.to_path_buf()))?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `route` [INFO] [stdout] --> src/server/handlers.rs:43:57 [INFO] [stdout] | [INFO] [stdout] 43 | fn serve_http(&mut self, request: &Request, route: &Route) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_route` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `route` [INFO] [stdout] --> src/server/handlers.rs:104:57 [INFO] [stdout] | [INFO] [stdout] 104 | fn serve_http(&mut self, request: &Request, route: &Route) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_route` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/http/body.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | let mut pos = 0; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/http/body.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | let mut pos = 0; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/server/uploader.rs:70:46 [INFO] [stdout] | [INFO] [stdout] 70 | fs::remove_file(&file.path).map_err(|e| [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/server/server.rs:164:53 [INFO] [stdout] | [INFO] [stdout] 164 | ... if let Some(s) = session { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `should_close` is never read [INFO] [stdout] --> src/server/server.rs:171:49 [INFO] [stdout] | [INFO] [stdout] 171 | ... should_close = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `should_close` is never read [INFO] [stdout] --> src/server/server.rs:219:45 [INFO] [stdout] | [INFO] [stdout] 219 | ... should_close = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `should_close` is never read [INFO] [stdout] --> src/server/server.rs:239:34 [INFO] [stdout] | [INFO] [stdout] 239 | ... should_close = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/server/static_files.rs:133:23 [INFO] [stdout] | [INFO] [stdout] 133 | .map_err(|e| ServerError::FileNotFound(path.to_path_buf()))?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `route` [INFO] [stdout] --> src/server/handlers.rs:43:57 [INFO] [stdout] | [INFO] [stdout] 43 | fn serve_http(&mut self, request: &Request, route: &Route) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_route` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `route` [INFO] [stdout] --> src/server/handlers.rs:104:57 [INFO] [stdout] | [INFO] [stdout] 104 | fn serve_http(&mut self, request: &Request, route: &Route) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_route` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/server/uploader.rs:70:46 [INFO] [stdout] | [INFO] [stdout] 70 | fs::remove_file(&file.path).map_err(|e| [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/config/config.rs:129:22 [INFO] [stdout] | [INFO] [stdout] 129 | for (status, path) in &self.custom_pages { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `version` is never read [INFO] [stdout] --> src/http/response.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct ResponseBuilder { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 18 | version: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ResponseBuilder` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_text_content_type` is never used [INFO] [stdout] --> src/http/body.rs:405:4 [INFO] [stdout] | [INFO] [stdout] 405 | fn is_text_content_type(content_type: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_part_data` is never used [INFO] [stdout] --> src/http/body.rs:414:4 [INFO] [stdout] | [INFO] [stdout] 414 | fn process_part_data(data: &[u8], content_type: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ResponseBuilder` [INFO] [stdout] --> src/http/response.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> ResponseBuilder { [INFO] [stdout] 26 | | ResponseBuilder { [INFO] [stdout] 27 | | version: "HTTP/1.1".to_string(), [INFO] [stdout] 28 | | status_code: HttpStatusCode::Ok, [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 24 + impl Default for ResponseBuilder { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `http::response::Response` [INFO] [stdout] --> src/http/response.rs:133:5 [INFO] [stdout] | [INFO] [stdout] 133 | / pub fn to_string(self) -> String { [INFO] [stdout] 134 | | let mut response = format!("{} {}\r\n", self.version, self.status_code as u16); [INFO] [stdout] 135 | | for header in self.headers { [INFO] [stdout] 136 | | response.push_str(&header.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 146 | | response [INFO] [stdout] 147 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `http::response::Response` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/http/response.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / match self.body { [INFO] [stdout] 141 | | Some(body) => { [INFO] [stdout] 142 | | response.push_str(&body.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(body) = self.body { [INFO] [stdout] 141 + response.push_str(&body.to_string()); [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/http/request.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn from_str(method: &str) -> HttpMethod { [INFO] [stdout] 22 | | match method { [INFO] [stdout] 23 | | "GET" => HttpMethod::GET, [INFO] [stdout] 24 | | "POST" => HttpMethod::POST, [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RequestBuilder` [INFO] [stdout] --> src/http/request.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / pub fn new() -> RequestBuilder { [INFO] [stdout] 73 | | RequestBuilder { [INFO] [stdout] 74 | | method: HttpMethod::GET, [INFO] [stdout] 75 | | uri: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 80 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 71 + impl Default for RequestBuilder { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `http::request::Request` [INFO] [stdout] --> src/http/request.rs:129:5 [INFO] [stdout] | [INFO] [stdout] 129 | / pub fn to_string(&self) -> String { [INFO] [stdout] 130 | | let mut request = format!("{} {} {}\r\n", self.method, self.uri, self.version); [INFO] [stdout] 131 | | for header in self.headers.clone() { [INFO] [stdout] 132 | | request.push_str(&header.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 143 | | request [INFO] [stdout] 144 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `http::request::Request` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/http/request.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match &self.body { [INFO] [stdout] 138 | | Some(body) => { [INFO] [stdout] 139 | | request.push_str(&body.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 137 ~ if let Some(body) = &self.body { [INFO] [stdout] 138 + request.push_str(&body.to_string()); [INFO] [stdout] 139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/http/request.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | let body = match result { [INFO] [stdout] | ________________^ [INFO] [stdout] 183 | | Ok(body) => Some(body), [INFO] [stdout] 184 | | Err(_) => None [INFO] [stdout] 185 | | }; [INFO] [stdout] | |_____^ help: replace with: `result.ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/config/config.rs:129:22 [INFO] [stdout] | [INFO] [stdout] 129 | for (status, path) in &self.custom_pages { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/http/header.rs:187:5 [INFO] [stdout] | [INFO] [stdout] 187 | / pub fn from_str(name: &str) -> Self { [INFO] [stdout] 188 | | match name.to_lowercase().as_str() { [INFO] [stdout] 189 | | "content-type" => HeaderName::ContentType, [INFO] [stdout] 190 | | "content-length" => HeaderName::ContentLength, [INFO] [stdout] ... | [INFO] [stdout] 210 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/http/header.rs:240:5 [INFO] [stdout] | [INFO] [stdout] 240 | / pub fn from_str(value: &str) -> Self { [INFO] [stdout] 241 | | match value.to_lowercase().as_str() { [INFO] [stdout] 242 | | "text/plain" => ContentType::TextPlain, [INFO] [stdout] 243 | | "text/html" => ContentType::TextHtml, [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `http::header::Cookie` [INFO] [stdout] --> src/http/header.rs:388:5 [INFO] [stdout] | [INFO] [stdout] 388 | / pub fn to_string(&self) -> String { [INFO] [stdout] 389 | | let mut cookie_str = format!("{}={}", self.name, self.value); [INFO] [stdout] 390 | | [INFO] [stdout] 391 | | if self.options.http_only { [INFO] [stdout] ... | [INFO] [stdout] 421 | | cookie_str [INFO] [stdout] 422 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `http::header::Cookie` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `version` is never read [INFO] [stdout] --> src/http/response.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct ResponseBuilder { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 18 | version: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ResponseBuilder` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_text_content_type` is never used [INFO] [stdout] --> src/http/body.rs:405:4 [INFO] [stdout] | [INFO] [stdout] 405 | fn is_text_content_type(content_type: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_part_data` is never used [INFO] [stdout] --> src/http/body.rs:414:4 [INFO] [stdout] | [INFO] [stdout] 414 | fn process_part_data(data: &[u8], content_type: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ResponseBuilder` [INFO] [stdout] --> src/http/response.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> ResponseBuilder { [INFO] [stdout] 26 | | ResponseBuilder { [INFO] [stdout] 27 | | version: "HTTP/1.1".to_string(), [INFO] [stdout] 28 | | status_code: HttpStatusCode::Ok, [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 24 + impl Default for ResponseBuilder { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `http::response::Response` [INFO] [stdout] --> src/http/response.rs:133:5 [INFO] [stdout] | [INFO] [stdout] 133 | / pub fn to_string(self) -> String { [INFO] [stdout] 134 | | let mut response = format!("{} {}\r\n", self.version, self.status_code as u16); [INFO] [stdout] 135 | | for header in self.headers { [INFO] [stdout] 136 | | response.push_str(&header.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 146 | | response [INFO] [stdout] 147 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `http::response::Response` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/http/response.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / match self.body { [INFO] [stdout] 141 | | Some(body) => { [INFO] [stdout] 142 | | response.push_str(&body.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 140 ~ if let Some(body) = self.body { [INFO] [stdout] 141 + response.push_str(&body.to_string()); [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/http/request.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn from_str(method: &str) -> HttpMethod { [INFO] [stdout] 22 | | match method { [INFO] [stdout] 23 | | "GET" => HttpMethod::GET, [INFO] [stdout] 24 | | "POST" => HttpMethod::POST, [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RequestBuilder` [INFO] [stdout] --> src/http/request.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / pub fn new() -> RequestBuilder { [INFO] [stdout] 73 | | RequestBuilder { [INFO] [stdout] 74 | | method: HttpMethod::GET, [INFO] [stdout] 75 | | uri: String::new(), [INFO] [stdout] ... | [INFO] [stdout] 80 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 71 + impl Default for RequestBuilder { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MultipartForm` [INFO] [stdout] --> src/http/body.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | / pub fn new() -> Self { [INFO] [stdout] 72 | | MultipartForm { [INFO] [stdout] 73 | | fields: HashMap::new(), [INFO] [stdout] 74 | | files: HashMap::new(), [INFO] [stdout] 75 | | } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 70 + impl Default for MultipartForm { [INFO] [stdout] 71 + fn default() -> Self { [INFO] [stdout] 72 + Self::new() [INFO] [stdout] 73 + } [INFO] [stdout] 74 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `http::request::Request` [INFO] [stdout] --> src/http/request.rs:129:5 [INFO] [stdout] | [INFO] [stdout] 129 | / pub fn to_string(&self) -> String { [INFO] [stdout] 130 | | let mut request = format!("{} {} {}\r\n", self.method, self.uri, self.version); [INFO] [stdout] 131 | | for header in self.headers.clone() { [INFO] [stdout] 132 | | request.push_str(&header.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 143 | | request [INFO] [stdout] 144 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `http::request::Request` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/http/request.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match &self.body { [INFO] [stdout] 138 | | Some(body) => { [INFO] [stdout] 139 | | request.push_str(&body.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 137 ~ if let Some(body) = &self.body { [INFO] [stdout] 138 + request.push_str(&body.to_string()); [INFO] [stdout] 139 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/http/request.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | let body = match result { [INFO] [stdout] | ________________^ [INFO] [stdout] 183 | | Ok(body) => Some(body), [INFO] [stdout] 184 | | Err(_) => None [INFO] [stdout] 185 | | }; [INFO] [stdout] | |_____^ help: replace with: `result.ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/http/header.rs:187:5 [INFO] [stdout] | [INFO] [stdout] 187 | / pub fn from_str(name: &str) -> Self { [INFO] [stdout] 188 | | match name.to_lowercase().as_str() { [INFO] [stdout] 189 | | "content-type" => HeaderName::ContentType, [INFO] [stdout] 190 | | "content-length" => HeaderName::ContentLength, [INFO] [stdout] ... | [INFO] [stdout] 210 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/http/header.rs:240:5 [INFO] [stdout] | [INFO] [stdout] 240 | / pub fn from_str(value: &str) -> Self { [INFO] [stdout] 241 | | match value.to_lowercase().as_str() { [INFO] [stdout] 242 | | "text/plain" => ContentType::TextPlain, [INFO] [stdout] 243 | | "text/html" => ContentType::TextHtml, [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/server/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod server; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `http::header::Cookie` [INFO] [stdout] --> src/http/header.rs:388:5 [INFO] [stdout] | [INFO] [stdout] 388 | / pub fn to_string(&self) -> String { [INFO] [stdout] 389 | | let mut cookie_str = format!("{}={}", self.name, self.value); [INFO] [stdout] 390 | | [INFO] [stdout] 391 | | if self.options.http_only { [INFO] [stdout] ... | [INFO] [stdout] 421 | | cookie_str [INFO] [stdout] 422 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `http::header::Cookie` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MultipartForm` [INFO] [stdout] --> src/http/body.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | / pub fn new() -> Self { [INFO] [stdout] 72 | | MultipartForm { [INFO] [stdout] 73 | | fields: HashMap::new(), [INFO] [stdout] 74 | | files: HashMap::new(), [INFO] [stdout] 75 | | } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 70 + impl Default for MultipartForm { [INFO] [stdout] 71 + fn default() -> Self { [INFO] [stdout] 72 + Self::new() [INFO] [stdout] 73 + } [INFO] [stdout] 74 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/server/server.rs:336:24 [INFO] [stdout] | [INFO] [stdout] 336 | if let Some(_) = self.find_host_by_fd(fd) { [INFO] [stdout] | -------^^^^^^^--------------------------- help: try: `if self.find_host_by_fd(fd).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/server/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod server; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/host.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | return rr; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 152 - return rr; [INFO] [stdout] 152 + rr [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/host.rs:154:17 [INFO] [stdout] | [INFO] [stdout] 154 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 154 - return false; [INFO] [stdout] 154 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/server/host.rs:203:93 [INFO] [stdout] | [INFO] [stdout] 203 | if !listing.is_directory_contain_file(Path::new(&listing.directory.join(&request.uri.trim_start_matches("/")))) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `request.uri.trim_start_matches("/")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/host.rs:205:49 [INFO] [stdout] | [INFO] [stdout] 205 | return Ok(self.redirect(&redirect)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `redirect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/host.rs:209:45 [INFO] [stdout] | [INFO] [stdout] 209 | return Ok(self.redirect(&redirect)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `redirect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/server/static_files.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if full_path.is_dir() { [INFO] [stdout] 88 | | if self.allow_directory_listing { [INFO] [stdout] 89 | | return self.serve_directory(&full_path); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if full_path.is_dir() [INFO] [stdout] 88 ~ && self.allow_directory_listing { [INFO] [stdout] 89 | return self.serve_directory(&full_path); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/server/server.rs:336:24 [INFO] [stdout] | [INFO] [stdout] 336 | if let Some(_) = self.find_host_by_fd(fd) { [INFO] [stdout] | -------^^^^^^^--------------------------- help: try: `if self.find_host_by_fd(fd).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/host.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | return rr; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 152 - return rr; [INFO] [stdout] 152 + rr [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/host.rs:154:17 [INFO] [stdout] | [INFO] [stdout] 154 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 154 - return false; [INFO] [stdout] 154 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/server/host.rs:203:93 [INFO] [stdout] | [INFO] [stdout] 203 | if !listing.is_directory_contain_file(Path::new(&listing.directory.join(&request.uri.trim_start_matches("/")))) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `request.uri.trim_start_matches("/")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/host.rs:205:49 [INFO] [stdout] | [INFO] [stdout] 205 | return Ok(self.redirect(&redirect)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `redirect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/server/cgi.rs:72:32 [INFO] [stdout] | [INFO] [stdout] 72 | ... if !HttpStatusCode::from_code(code).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `HttpStatusCode::from_code(code).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/host.rs:209:45 [INFO] [stdout] | [INFO] [stdout] 209 | return Ok(self.redirect(&redirect)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `redirect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/server/cgi.rs:69:43 [INFO] [stdout] | [INFO] [stdout] 69 | if let Some(status_str) = line.splitn(2, ':').nth(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `line.split_once(':').map(|x| x.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/server/cgi.rs:70:56 [INFO] [stdout] | [INFO] [stdout] 70 | if let Some(code_str) = status_str.trim().split_whitespace().next() { [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/server/handlers.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | / pub mod handlers { [INFO] [stdout] 4 | | use crate::http::request::Request; [INFO] [stdout] 5 | | use crate::http::response::Response; [INFO] [stdout] 6 | | use crate::server::route::Route; [INFO] [stdout] ... | [INFO] [stdout] 425 | | pub use session_api::SessionHandler; [INFO] [stdout] 426 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/handlers.rs:107:46 [INFO] [stdout] | [INFO] [stdout] 107 | self.handle_request(request, &script_path) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/server/static_files.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / if full_path.is_dir() { [INFO] [stdout] 88 | | if self.allow_directory_listing { [INFO] [stdout] 89 | | return self.serve_directory(&full_path); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if full_path.is_dir() [INFO] [stdout] 88 ~ && self.allow_directory_listing { [INFO] [stdout] 89 | return self.serve_directory(&full_path); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/server/handlers.rs:248:42 [INFO] [stdout] | [INFO] [stdout] 248 | for (_, file) in &form.files { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 248 - for (_, file) in &form.files { [INFO] [stdout] 248 + for file in form.files.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/server/cgi.rs:72:32 [INFO] [stdout] | [INFO] [stdout] 72 | ... if !HttpStatusCode::from_code(code).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `HttpStatusCode::from_code(code).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/server/cgi.rs:69:43 [INFO] [stdout] | [INFO] [stdout] 69 | if let Some(status_str) = line.splitn(2, ':').nth(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `line.split_once(':').map(|x| x.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/server/cgi.rs:70:56 [INFO] [stdout] | [INFO] [stdout] 70 | if let Some(code_str) = status_str.trim().split_whitespace().next() { [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/server/uploader.rs:25:23 [INFO] [stdout] | [INFO] [stdout] 25 | database: match list_files { [INFO] [stdout] | _______________________^ [INFO] [stdout] 26 | | Ok(files) => files, [INFO] [stdout] 27 | | Err(_) => Vec::new() [INFO] [stdout] 28 | | }, [INFO] [stdout] | |_____________^ help: replace it with: `list_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/server/uploader.rs:65:26 [INFO] [stdout] | [INFO] [stdout] 65 | let file_index = self.database.iter() [INFO] [stdout] | __________________________^ [INFO] [stdout] 66 | | .position(|f| f.id == file_id) [INFO] [stdout] 67 | | .ok_or_else(|| UploaderError::FileNotFound(file_id))?; [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 67 - .ok_or_else(|| UploaderError::FileNotFound(file_id))?; [INFO] [stdout] 67 + .ok_or(UploaderError::FileNotFound(file_id))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/server/handlers.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | / pub mod handlers { [INFO] [stdout] 4 | | use crate::http::request::Request; [INFO] [stdout] 5 | | use crate::http::response::Response; [INFO] [stdout] 6 | | use crate::server::route::Route; [INFO] [stdout] ... | [INFO] [stdout] 425 | | pub use session_api::SessionHandler; [INFO] [stdout] 426 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/handlers.rs:107:46 [INFO] [stdout] | [INFO] [stdout] 107 | self.handle_request(request, &script_path) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/server/handlers.rs:248:42 [INFO] [stdout] | [INFO] [stdout] 248 | for (_, file) in &form.files { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 248 - for (_, file) in &form.files { [INFO] [stdout] 248 + for file in form.files.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/server/uploader.rs:25:23 [INFO] [stdout] | [INFO] [stdout] 25 | database: match list_files { [INFO] [stdout] | _______________________^ [INFO] [stdout] 26 | | Ok(files) => files, [INFO] [stdout] 27 | | Err(_) => Vec::new() [INFO] [stdout] 28 | | }, [INFO] [stdout] | |_____________^ help: replace it with: `list_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/server/uploader.rs:65:26 [INFO] [stdout] | [INFO] [stdout] 65 | let file_index = self.database.iter() [INFO] [stdout] | __________________________^ [INFO] [stdout] 66 | | .position(|f| f.id == file_id) [INFO] [stdout] 67 | | .ok_or_else(|| UploaderError::FileNotFound(file_id))?; [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 67 - .ok_or_else(|| UploaderError::FileNotFound(file_id))?; [INFO] [stdout] 67 + .ok_or(UploaderError::FileNotFound(file_id))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/server/errors.rs:358:33 [INFO] [stdout] | [INFO] [stdout] 358 | match std::fs::read(&format!("{}/{}", sites_dir(), error_page_path)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/{}", sites_dir(), error_page_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/stream.rs:424:42 [INFO] [stdout] | [INFO] [stdout] 424 | return usize::from_str_radix(&size_str.trim(), 16).ok(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `size_str.trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/server/session.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod session { [INFO] [stdout] 2 | | use colored::*; [INFO] [stdout] 3 | | use uuid::Uuid; [INFO] [stdout] 4 | | use std::collections::HashMap; [INFO] [stdout] ... | [INFO] [stdout] 265 | | pub use session_middleware::SessionMiddleware; [INFO] [stdout] 266 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/server/session.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | self.expires_at.map_or(false, |expires| SystemTime::now() > expires) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 33 - self.expires_at.map_or(false, |expires| SystemTime::now() > expires) [INFO] [stdout] 33 + self.expires_at.is_some_and(|expires| SystemTime::now() > expires) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MemorySessionStore` [INFO] [stdout] --> src/server/session.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | / pub fn new() -> Self { [INFO] [stdout] 87 | | MemorySessionStore { [INFO] [stdout] 88 | | sessions: HashMap::new() [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 85 ~ impl Default for MemorySessionStore { [INFO] [stdout] 86 + fn default() -> Self { [INFO] [stdout] 87 + Self::new() [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] 90 + [INFO] [stdout] 91 ~ impl MemorySessionStore { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/server/errors.rs:358:33 [INFO] [stdout] | [INFO] [stdout] 358 | match std::fs::read(&format!("{}/{}", sites_dir(), error_page_path)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/{}", sites_dir(), error_page_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/server/session.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | options.max_age = Some(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `http::header::CookieOptions { max_age: Some(0), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/server/session.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | let mut options = CookieOptions::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/session.rs:248:29 [INFO] [stdout] | [INFO] [stdout] 248 | ... return Err(SessionError::SessionExpiredRedirect(redirect.to_string()).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 248 - return Err(SessionError::SessionExpiredRedirect(redirect.to_string()).into()); [INFO] [stdout] 248 + Err(SessionError::SessionExpiredRedirect(redirect.to_string()).into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/session.rs:250:29 [INFO] [stdout] | [INFO] [stdout] 250 | ... return Err(SessionError::SessionExpired("Session expired".to_string()).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 250 - return Err(SessionError::SessionExpired("Session expired".to_string()).into()); [INFO] [stdout] 250 + Err(SessionError::SessionExpired("Session expired".to_string()).into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/config/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod config; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/server/stream.rs:424:42 [INFO] [stdout] | [INFO] [stdout] 424 | return usize::from_str_radix(&size_str.trim(), 16).ok(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `size_str.trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/server/session.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / pub mod session { [INFO] [stdout] 2 | | use colored::*; [INFO] [stdout] 3 | | use uuid::Uuid; [INFO] [stdout] 4 | | use std::collections::HashMap; [INFO] [stdout] ... | [INFO] [stdout] 265 | | pub use session_middleware::SessionMiddleware; [INFO] [stdout] 266 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/server/session.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | self.expires_at.map_or(false, |expires| SystemTime::now() > expires) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 33 - self.expires_at.map_or(false, |expires| SystemTime::now() > expires) [INFO] [stdout] 33 + self.expires_at.is_some_and(|expires| SystemTime::now() > expires) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MemorySessionStore` [INFO] [stdout] --> src/server/session.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | / pub fn new() -> Self { [INFO] [stdout] 87 | | MemorySessionStore { [INFO] [stdout] 88 | | sessions: HashMap::new() [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 85 ~ impl Default for MemorySessionStore { [INFO] [stdout] 86 + fn default() -> Self { [INFO] [stdout] 87 + Self::new() [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] 90 + [INFO] [stdout] 91 ~ impl MemorySessionStore { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/server/session.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | options.max_age = Some(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `http::header::CookieOptions { max_age: Some(0), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/server/session.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | let mut options = CookieOptions::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/session.rs:248:29 [INFO] [stdout] | [INFO] [stdout] 248 | ... return Err(SessionError::SessionExpiredRedirect(redirect.to_string()).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 248 - return Err(SessionError::SessionExpiredRedirect(redirect.to_string()).into()); [INFO] [stdout] 248 + Err(SessionError::SessionExpiredRedirect(redirect.to_string()).into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/server/session.rs:250:29 [INFO] [stdout] | [INFO] [stdout] 250 | ... return Err(SessionError::SessionExpired("Session expired".to_string()).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 250 - return Err(SessionError::SessionExpired("Session expired".to_string()).into()); [INFO] [stdout] 250 + Err(SessionError::SessionExpired("Session expired".to_string()).into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/config/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod config; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/config/config.rs:133:27 [INFO] [stdout] | [INFO] [stdout] 133 | } else if let Err(_) = status.parse::() { [INFO] [stdout] | -------^^^^^^------------------------ help: try: `if status.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/config/config.rs:422:49 [INFO] [stdout] | [INFO] [stdout] 422 | let config_content = fs::read_to_string(&format!("{}/.cargo/localhost-cli/config.json", home_dir)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/.cargo/localhost-cli/config.json", home_dir)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/config/config.rs:478:26 [INFO] [stdout] | [INFO] [stdout] 478 | logger.error(&msg, MODULE); [INFO] [stdout] | ^^^^ help: change this to: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/config.rs:493:1 [INFO] [stdout] | [INFO] [stdout] 493 | / impl Default for SessionConfig { [INFO] [stdout] 494 | | fn default() -> Self { [INFO] [stdout] 495 | | SessionConfig { [INFO] [stdout] 496 | | enabled: None, [INFO] [stdout] ... | [INFO] [stdout] 501 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 51 + #[derive(Default)] [INFO] [stdout] 52 | pub struct SessionConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `defaultPath` should have a snake case name [INFO] [stdout] --> src/server/static_files.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | let defaultPath = self.directory.join(".default/index.html"); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `default_path` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/config/config.rs:133:27 [INFO] [stdout] | [INFO] [stdout] 133 | } else if let Err(_) = status.parse::() { [INFO] [stdout] | -------^^^^^^------------------------ help: try: `if status.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `unifiedReader` should have a snake case name [INFO] [stdout] --> src/server/stream.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | pub mod unifiedReader { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `unified_reader` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/config/config.rs:422:49 [INFO] [stdout] | [INFO] [stdout] 422 | let config_content = fs::read_to_string(&format!("{}/.cargo/localhost-cli/config.json", home_dir)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/.cargo/localhost-cli/config.json", home_dir)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/config/config.rs:478:26 [INFO] [stdout] | [INFO] [stdout] 478 | logger.error(&msg, MODULE); [INFO] [stdout] | ^^^^ help: change this to: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/config.rs:493:1 [INFO] [stdout] | [INFO] [stdout] 493 | / impl Default for SessionConfig { [INFO] [stdout] 494 | | fn default() -> Self { [INFO] [stdout] 495 | | SessionConfig { [INFO] [stdout] 496 | | enabled: None, [INFO] [stdout] ... | [INFO] [stdout] 501 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 51 + #[derive(Default)] [INFO] [stdout] 52 | pub struct SessionConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `defaultPath` should have a snake case name [INFO] [stdout] --> src/server/static_files.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | let defaultPath = self.directory.join(".default/index.html"); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `default_path` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `unifiedReader` should have a snake case name [INFO] [stdout] --> src/server/stream.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | pub mod unifiedReader { [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `unified_reader` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/bin/cli.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 136 | fn create_server(args: CreateArgs) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/bin/cli.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 136 | fn create_server(args: CreateArgs) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.41s [INFO] running `Command { std: "docker" "inspect" "b9503296ab0843e7ef71d23ac4a4cd8ff31caf9bd46117f45b58b20f37a3edfd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b9503296ab0843e7ef71d23ac4a4cd8ff31caf9bd46117f45b58b20f37a3edfd", kill_on_drop: false }` [INFO] [stdout] b9503296ab0843e7ef71d23ac4a4cd8ff31caf9bd46117f45b58b20f37a3edfd