[INFO] cloning repository https://github.com/firmanhp/codecrafters-http-server-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/firmanhp/codecrafters-http-server-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffirmanhp%2Fcodecrafters-http-server-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffirmanhp%2Fcodecrafters-http-server-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f6cdfe79e3a85bf9a51d96fc9a5e236079b6d713 [INFO] linting firmanhp/codecrafters-http-server-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffirmanhp%2Fcodecrafters-http-server-rust" "/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/firmanhp/codecrafters-http-server-rust [INFO] finished tweaking git repo https://github.com/firmanhp/codecrafters-http-server-rust [INFO] tweaked toml for git repo https://github.com/firmanhp/codecrafters-http-server-rust written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/firmanhp/codecrafters-http-server-rust 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/firmanhp/codecrafters-http-server-rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded pin-project-lite v0.2.10 [INFO] [stderr] Downloaded quote v1.0.32 [INFO] [stderr] Downloaded addr2line v0.20.0 [INFO] [stderr] Downloaded windows-targets v0.48.1 [INFO] [stderr] Downloaded clap_derive v4.5.5 [INFO] [stderr] Downloaded clap v4.5.6 [INFO] [stderr] Downloaded backtrace v0.3.68 [INFO] [stderr] Downloaded syn v2.0.27 [INFO] [stderr] Downloaded gimli v0.27.3 [INFO] [stderr] Downloaded syn v1.0.48 [INFO] [stderr] Downloaded object v0.31.1 [INFO] [stderr] Downloaded tokio v1.29.1 [INFO] [stderr] Downloaded clap_builder v4.5.6 [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] 7ac3ca698e94cd1bd5ff3fbb11c94ff7b1453bee0c543e951470c8d74269ab41 [INFO] running `Command { std: "docker" "start" "-a" "7ac3ca698e94cd1bd5ff3fbb11c94ff7b1453bee0c543e951470c8d74269ab41", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7ac3ca698e94cd1bd5ff3fbb11c94ff7b1453bee0c543e951470c8d74269ab41", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7ac3ca698e94cd1bd5ff3fbb11c94ff7b1453bee0c543e951470c8d74269ab41", kill_on_drop: false }` [INFO] [stdout] 7ac3ca698e94cd1bd5ff3fbb11c94ff7b1453bee0c543e951470c8d74269ab41 [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] 7a8f06f03fe8bd311464882fd28059f1dd2a7562babdbda16472b1661210f794 [INFO] running `Command { std: "docker" "start" "-a" "7a8f06f03fe8bd311464882fd28059f1dd2a7562babdbda16472b1661210f794", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.85 [INFO] [stderr] Compiling syn v1.0.48 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Checking anstyle-query v1.1.0 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Compiling thiserror v1.0.38 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Compiling tokio v1.29.1 [INFO] [stderr] Checking clap_lex v0.7.1 [INFO] [stderr] Compiling anyhow v1.0.68 [INFO] [stderr] Checking socket2 v0.4.9 [INFO] [stderr] Checking miniz_oxide v0.7.1 [INFO] [stderr] Checking bytes v1.3.0 [INFO] [stderr] Checking pin-project-lite v0.2.10 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking pretty_assertions v1.4.0 [INFO] [stderr] Checking itertools v0.11.0 [INFO] [stderr] Checking flate2 v1.0.30 [INFO] [stderr] Checking clap_builder v4.5.6 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Compiling quote v1.0.32 [INFO] [stderr] Compiling syn v2.0.27 [INFO] [stderr] Compiling thiserror-impl v1.0.38 [INFO] [stderr] Compiling tokio-macros v2.1.0 [INFO] [stderr] Compiling clap_derive v4.5.5 [INFO] [stderr] Checking clap v4.5.6 [INFO] [stderr] Checking http-server-starter-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:28:28 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn apply_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 28 - pub fn apply_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] 28 + pub fn apply_from_line(self, line: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn host(mut self: Self, host: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 49 - pub fn host(mut self: Self, host: String) -> Self { [INFO] [stdout] 49 + pub fn host(mut self, host: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:54:23 [INFO] [stdout] | [INFO] [stdout] 54 | pub fn user_agent(mut self: Self, user_agent: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 54 - pub fn user_agent(mut self: Self, user_agent: String) -> Self { [INFO] [stdout] 54 + pub fn user_agent(mut self, user_agent: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn accept(mut self: Self, accept: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 59 - pub fn accept(mut self: Self, accept: String) -> Self { [INFO] [stdout] 59 + pub fn accept(mut self, accept: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:28:28 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn apply_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 28 - pub fn apply_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] 28 + pub fn apply_from_line(self, line: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn host(mut self: Self, host: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 49 - pub fn host(mut self: Self, host: String) -> Self { [INFO] [stdout] 49 + pub fn host(mut self, host: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:54:23 [INFO] [stdout] | [INFO] [stdout] 54 | pub fn user_agent(mut self: Self, user_agent: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 54 - pub fn user_agent(mut self: Self, user_agent: String) -> Self { [INFO] [stdout] 54 + pub fn user_agent(mut self, user_agent: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn accept(mut self: Self, accept: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 59 - pub fn accept(mut self: Self, accept: String) -> Self { [INFO] [stdout] 59 + pub fn accept(mut self, accept: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 64 - pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] 64 + pub fn content_type(mut self, content_type: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 64 - pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] 64 + pub fn content_type(mut self, content_type: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:69:27 [INFO] [stdout] | [INFO] [stdout] 69 | pub fn content_length(mut self: Self, content_length: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 69 - pub fn content_length(mut self: Self, content_length: usize) -> Self { [INFO] [stdout] 69 + pub fn content_length(mut self, content_length: usize) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:74:28 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn accept_encoding(mut self: Self, accept_encoding: ContentEncoding) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 74 - pub fn accept_encoding(mut self: Self, accept_encoding: ContentEncoding) -> Self { [INFO] [stdout] 74 + pub fn accept_encoding(mut self, accept_encoding: ContentEncoding) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:69:27 [INFO] [stdout] | [INFO] [stdout] 69 | pub fn content_length(mut self: Self, content_length: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 69 - pub fn content_length(mut self: Self, content_length: usize) -> Self { [INFO] [stdout] 69 + pub fn content_length(mut self, content_length: usize) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:79:35 [INFO] [stdout] | [INFO] [stdout] 79 | fn accept_encodings_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 79 - fn accept_encodings_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] 79 + fn accept_encodings_from_line(self, line: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:94:18 [INFO] [stdout] | [INFO] [stdout] 94 | pub fn build(self: Self) -> HttpRequestHeader { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 94 - pub fn build(self: Self) -> HttpRequestHeader { [INFO] [stdout] 94 + pub fn build(self) -> HttpRequestHeader { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:157:19 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn header(mut self: Self, header: HttpRequestHeader) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 157 - pub fn header(mut self: Self, header: HttpRequestHeader) -> Self { [INFO] [stdout] 157 + pub fn header(mut self, header: HttpRequestHeader) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:74:28 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn accept_encoding(mut self: Self, accept_encoding: ContentEncoding) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 74 - pub fn accept_encoding(mut self: Self, accept_encoding: ContentEncoding) -> Self { [INFO] [stdout] 74 + pub fn accept_encoding(mut self, accept_encoding: ContentEncoding) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn body(mut self: Self, body: Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 162 - pub fn body(mut self: Self, body: Vec) -> Self { [INFO] [stdout] 162 + pub fn body(mut self, body: Vec) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:167:18 [INFO] [stdout] | [INFO] [stdout] 167 | pub fn build(self: Self) -> HttpRequest { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 167 - pub fn build(self: Self) -> HttpRequest { [INFO] [stdout] 167 + pub fn build(self) -> HttpRequest { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:32:25 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 32 - pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] 32 + pub fn content_type(mut self, content_type: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:79:35 [INFO] [stdout] | [INFO] [stdout] 79 | fn accept_encodings_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 79 - fn accept_encodings_from_line(self: Self, line: &str) -> Self { [INFO] [stdout] 79 + fn accept_encodings_from_line(self, line: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn body(mut self: Self, body: EncodedContent) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 37 - pub fn body(mut self: Self, body: EncodedContent) -> Self { [INFO] [stdout] 37 + pub fn body(mut self, body: EncodedContent) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn encode_body(mut self: Self, encoding_type: ContentEncoding) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 42 - pub fn encode_body(mut self: Self, encoding_type: ContentEncoding) -> Result { [INFO] [stdout] 42 + pub fn encode_body(mut self, encoding_type: ContentEncoding) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:94:18 [INFO] [stdout] | [INFO] [stdout] 94 | pub fn build(self: Self) -> HttpRequestHeader { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 94 - pub fn build(self: Self) -> HttpRequestHeader { [INFO] [stdout] 94 + pub fn build(self) -> HttpRequestHeader { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn build(self: Self) -> HttpResponse { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 49 - pub fn build(self: Self) -> HttpResponse { [INFO] [stdout] 49 + pub fn build(self) -> HttpResponse { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:157:19 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn header(mut self: Self, header: HttpRequestHeader) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 157 - pub fn header(mut self: Self, header: HttpRequestHeader) -> Self { [INFO] [stdout] 157 + pub fn header(mut self, header: HttpRequestHeader) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn body(mut self: Self, body: Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 162 - pub fn body(mut self: Self, body: Vec) -> Self { [INFO] [stdout] 162 + pub fn body(mut self, body: Vec) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response.rs:89:21 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn has_body(self: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 89 - pub fn has_body(self: &Self) -> bool { [INFO] [stdout] 89 + pub fn has_body(&self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/request/builder.rs:167:18 [INFO] [stdout] | [INFO] [stdout] 167 | pub fn build(self: Self) -> HttpRequest { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 167 - pub fn build(self: Self) -> HttpRequest { [INFO] [stdout] 167 + pub fn build(self) -> HttpRequest { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/encoding/types.rs:33:19 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn to_str(self: &Self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 33 - pub fn to_str(self: &Self) -> &str { [INFO] [stdout] 33 + pub fn to_str(&self) -> &str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:32:25 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 32 - pub fn content_type(mut self: Self, content_type: String) -> Self { [INFO] [stdout] 32 + pub fn content_type(mut self, content_type: String) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn body(mut self: Self, body: EncodedContent) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 37 - pub fn body(mut self: Self, body: EncodedContent) -> Self { [INFO] [stdout] 37 + pub fn body(mut self, body: EncodedContent) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/encoding/types.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | self: Self, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 50 - self: Self, [INFO] [stdout] 50 + self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn encode_body(mut self: Self, encoding_type: ContentEncoding) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 42 - pub fn encode_body(mut self: Self, encoding_type: ContentEncoding) -> Result { [INFO] [stdout] 42 + pub fn encode_body(mut self, encoding_type: ContentEncoding) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/encoding/types.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn decode(self: Self) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 65 - pub fn decode(self: Self) -> Result { [INFO] [stdout] 65 + pub fn decode(self) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response/builder.rs:49:18 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn build(self: Self) -> HttpResponse { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 49 - pub fn build(self: Self) -> HttpResponse { [INFO] [stdout] 49 + pub fn build(self) -> HttpResponse { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/response.rs:89:21 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn has_body(self: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 89 - pub fn has_body(self: &Self) -> bool { [INFO] [stdout] 89 + pub fn has_body(&self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/encoding/types.rs:33:19 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn to_str(self: &Self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 33 - pub fn to_str(self: &Self) -> &str { [INFO] [stdout] 33 + pub fn to_str(&self) -> &str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/encoding/types.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | self: Self, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 50 - self: Self, [INFO] [stdout] 50 + self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/encoding/types.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn decode(self: Self) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 65 - pub fn decode(self: Self) -> Result { [INFO] [stdout] 65 + pub fn decode(self) -> Result { [INFO] [stdout] | [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/request/builder.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | / match ContentEncoding::from(encoding) { [INFO] [stdout] 85 | | Some(encoding) => { [INFO] [stdout] 86 | | builder = builder.accept_encoding(encoding); [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [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] 84 ~ if let Some(encoding) = ContentEncoding::from(encoding) { [INFO] [stdout] 85 + builder = builder.accept_encoding(encoding); [INFO] [stdout] 86 + } [INFO] [stdout] | [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/request/builder.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | / match ContentEncoding::from(encoding) { [INFO] [stdout] 85 | | Some(encoding) => { [INFO] [stdout] 86 | | builder = builder.accept_encoding(encoding); [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [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] 84 ~ if let Some(encoding) = ContentEncoding::from(encoding) { [INFO] [stdout] 85 + builder = builder.accept_encoding(encoding); [INFO] [stdout] 86 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/request.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | / let mut read_buffer: Vec = vec![]; [INFO] [stdout] 97 | | read_buffer.reserve(128); [INFO] [stdout] | |_________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut read_buffer: Vec = Vec::with_capacity(128);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_line` doesn't need a mutable reference [INFO] [stdout] --> src/request.rs:98:19 [INFO] [stdout] | [INFO] [stdout] 98 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 98 - read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] 98 + read_line(&stream, &mut read_buffer)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/request.rs:98:19 [INFO] [stdout] | [INFO] [stdout] 98 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `stream` [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: the function `read_line` doesn't need a mutable reference [INFO] [stdout] --> src/request.rs:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 109 - read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] 109 + read_line(&stream, &mut read_buffer)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/request.rs:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `stream` [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: slow zero-filling initialization [INFO] [stdout] --> src/request.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | let mut body: Vec = vec![]; [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 120 | | body.resize(request_header.content_length, 0); [INFO] [stdout] | |_________________________________________________________^ help: consider replacing this with: `vec![0; request_header.content_length]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/response/builder.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !self.body.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.body.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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/response/builder.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | content_length: self [INFO] [stdout] | _____________________________^ [INFO] [stdout] 54 | | .body [INFO] [stdout] 55 | | .as_ref() [INFO] [stdout] 56 | | .and_then(|c| Some(c.buffer.len())) [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 ~ content_length: self [INFO] [stdout] 54 + .body [INFO] [stdout] 55 + .as_ref().map(|c| c.buffer.len()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/request.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | / let mut read_buffer: Vec = vec![]; [INFO] [stdout] 97 | | read_buffer.reserve(128); [INFO] [stdout] | |_________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut read_buffer: Vec = Vec::with_capacity(128);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_line` doesn't need a mutable reference [INFO] [stdout] --> src/request.rs:98:19 [INFO] [stdout] | [INFO] [stdout] 98 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 98 - read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] 98 + read_line(&stream, &mut read_buffer)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/request.rs:98:19 [INFO] [stdout] | [INFO] [stdout] 98 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `stream` [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: the function `read_line` doesn't need a mutable reference [INFO] [stdout] --> src/request.rs:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 109 - read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] 109 + read_line(&stream, &mut read_buffer)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/request.rs:109:23 [INFO] [stdout] | [INFO] [stdout] 109 | read_line(&mut stream, &mut read_buffer)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `stream` [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: slow zero-filling initialization [INFO] [stdout] --> src/request.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | let mut body: Vec = vec![]; [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 120 | | body.resize(request_header.content_length, 0); [INFO] [stdout] | |_________________________________________________________^ help: consider replacing this with: `vec![0; request_header.content_length]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/response/builder.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if !self.body.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.body.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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/response/builder.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | content_length: self [INFO] [stdout] | _____________________________^ [INFO] [stdout] 54 | | .body [INFO] [stdout] 55 | | .as_ref() [INFO] [stdout] 56 | | .and_then(|c| Some(c.buffer.len())) [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 ~ content_length: self [INFO] [stdout] 54 + .body [INFO] [stdout] 55 + .as_ref().map(|c| c.buffer.len()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/response.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | String::from(format!("HTTP/1.1 {} {}", self.to_code(), self.to_str())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("HTTP/1.1 {} {}", self.to_code(), self.to_str())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/response.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | / let mut result: Vec = vec![]; [INFO] [stdout] 55 | | result.reserve(self.content_length); [INFO] [stdout] | |____________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut result: Vec = Vec::with_capacity(self.content_length);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/response.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | return self.body.buffer.len() > 0; [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] 90 - return self.body.buffer.len() > 0; [INFO] [stdout] 90 + self.body.buffer.len() > 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/response.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | return self.body.buffer.len() > 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.body.buffer.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing/files.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | / return HttpResponseBuilder::new(HttpResponseType::InternalServerError) [INFO] [stdout] 63 | | .body(EncodedContent::from(format!("Error: {}", err).into_bytes())) [INFO] [stdout] 64 | | .build() [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] 62 ~ HttpResponseBuilder::new(HttpResponseType::InternalServerError) [INFO] [stdout] 63 + .body(EncodedContent::from(format!("Error: {}", err).into_bytes())) [INFO] [stdout] 64 + .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | return files::handle(request); [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] 18 - return files::handle(request); [INFO] [stdout] 18 + files::handle(request) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / return HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 22 | | .body(EncodedContent::from(String::from(to_echo).into_bytes())) [INFO] [stdout] 23 | | .build(); [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] 21 ~ HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 22 + .body(EncodedContent::from(String::from(to_echo).into_bytes())) [INFO] [stdout] 23 ~ .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | / return HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 26 | | .body(EncodedContent::from(request.header.user_agent.into_bytes())) [INFO] [stdout] 27 | | .build(); [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] 25 ~ HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 26 + .body(EncodedContent::from(request.header.user_agent.into_bytes())) [INFO] [stdout] 27 ~ .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / return HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 30 | | .body(EncodedContent::from(String::from("").into_bytes())) [INFO] [stdout] 31 | | .build(); [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] 29 ~ HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 30 + .body(EncodedContent::from(String::from("").into_bytes())) [INFO] [stdout] 31 ~ .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | return HttpResponseBuilder::new(HttpResponseType::NotFound).build(); [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] 33 - return HttpResponseBuilder::new(HttpResponseType::NotFound).build(); [INFO] [stdout] 33 + HttpResponseBuilder::new(HttpResponseType::NotFound).build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ContentEncoding` which implements the `Copy` trait [INFO] [stdout] --> src/routing.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | let valid_encoding = requested_encodings.iter().next().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*requested_encodings.iter().next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/response.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | String::from(format!("HTTP/1.1 {} {}", self.to_code(), self.to_str())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("HTTP/1.1 {} {}", self.to_code(), self.to_str())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/response.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | / let mut result: Vec = vec![]; [INFO] [stdout] 55 | | result.reserve(self.content_length); [INFO] [stdout] | |____________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut result: Vec = Vec::with_capacity(self.content_length);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/response.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | return self.body.buffer.len() > 0; [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] 90 - return self.body.buffer.len() > 0; [INFO] [stdout] 90 + self.body.buffer.len() > 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/response.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | return self.body.buffer.len() > 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.body.buffer.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing/files.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | / return HttpResponseBuilder::new(HttpResponseType::InternalServerError) [INFO] [stdout] 63 | | .body(EncodedContent::from(format!("Error: {}", err).into_bytes())) [INFO] [stdout] 64 | | .build() [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] 62 ~ HttpResponseBuilder::new(HttpResponseType::InternalServerError) [INFO] [stdout] 63 + .body(EncodedContent::from(format!("Error: {}", err).into_bytes())) [INFO] [stdout] 64 + .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | return files::handle(request); [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] 18 - return files::handle(request); [INFO] [stdout] 18 + files::handle(request) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/main.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | host_files_path: args.directory.and_then(|s| Some(PathBuf::from(s))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.directory.map(|s| PathBuf::from(s))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / return HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 22 | | .body(EncodedContent::from(String::from(to_echo).into_bytes())) [INFO] [stdout] 23 | | .build(); [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] 21 ~ HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 22 + .body(EncodedContent::from(String::from(to_echo).into_bytes())) [INFO] [stdout] 23 ~ .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | / return HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 26 | | .body(EncodedContent::from(request.header.user_agent.into_bytes())) [INFO] [stdout] 27 | | .build(); [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] 25 ~ HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 26 + .body(EncodedContent::from(request.header.user_agent.into_bytes())) [INFO] [stdout] 27 ~ .build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / return HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 30 | | .body(EncodedContent::from(String::from("").into_bytes())) [INFO] [stdout] 31 | | .build(); [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] 29 ~ HttpResponseBuilder::new(HttpResponseType::Ok) [INFO] [stdout] 30 + .body(EncodedContent::from(String::from("").into_bytes())) [INFO] [stdout] 31 ~ .build() [INFO] [stdout] | [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/main.rs:45:39 [INFO] [stdout] | [INFO] [stdout] 45 | thread::spawn(move || match handle_connection(_stream, context) { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 46 | | Err(e) => { [INFO] [stdout] 47 | | println!("Error in connection: {}", e); [INFO] [stdout] ... | [INFO] [stdout] 50 | | }); [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] 45 ~ thread::spawn(move || if let Err(e) = handle_connection(_stream, context) { [INFO] [stdout] 46 + println!("Error in connection: {}", e); [INFO] [stdout] 47 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/routing.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | return HttpResponseBuilder::new(HttpResponseType::NotFound).build(); [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] 33 - return HttpResponseBuilder::new(HttpResponseType::NotFound).build(); [INFO] [stdout] 33 + HttpResponseBuilder::new(HttpResponseType::NotFound).build() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ContentEncoding` which implements the `Copy` trait [INFO] [stdout] --> src/routing.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | let valid_encoding = requested_encodings.iter().next().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*requested_encodings.iter().next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/main.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | host_files_path: args.directory.and_then(|s| Some(PathBuf::from(s))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.directory.map(|s| PathBuf::from(s))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [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/main.rs:45:39 [INFO] [stdout] | [INFO] [stdout] 45 | thread::spawn(move || match handle_connection(_stream, context) { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 46 | | Err(e) => { [INFO] [stdout] 47 | | println!("Error in connection: {}", e); [INFO] [stdout] ... | [INFO] [stdout] 50 | | }); [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] 45 ~ thread::spawn(move || if let Err(e) = handle_connection(_stream, context) { [INFO] [stdout] 46 + println!("Error in connection: {}", e); [INFO] [stdout] 47 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 18.68s [INFO] running `Command { std: "docker" "inspect" "7a8f06f03fe8bd311464882fd28059f1dd2a7562babdbda16472b1661210f794", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7a8f06f03fe8bd311464882fd28059f1dd2a7562babdbda16472b1661210f794", kill_on_drop: false }` [INFO] [stdout] 7a8f06f03fe8bd311464882fd28059f1dd2a7562babdbda16472b1661210f794