[INFO] cloning repository https://github.com/deployAt/rust_server [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/deployAt/rust_server" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FdeployAt%2Frust_server", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FdeployAt%2Frust_server'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 808406152efb44eb055ddcfd7550d591bccb775f [INFO] checking deployAt/rust_server against master#9fa580b1175018b0a276b0bc68f9827a106f7260 for pr-82565 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FdeployAt%2Frust_server" "/workspace/builds/worker-2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/deployAt/rust_server on toolchain 9fa580b1175018b0a276b0bc68f9827a106f7260 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+9fa580b1175018b0a276b0bc68f9827a106f7260" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/deployAt/rust_server [INFO] finished tweaking git repo https://github.com/deployAt/rust_server [INFO] tweaked toml for git repo https://github.com/deployAt/rust_server written to /workspace/builds/worker-2/source/Cargo.toml [INFO] crate git repo https://github.com/deployAt/rust_server already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+9fa580b1175018b0a276b0bc68f9827a106f7260" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/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" "rustops/crates-build-env@sha256:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+9fa580b1175018b0a276b0bc68f9827a106f7260" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4fda818499edd5343b5abb12c2703b8d1e3d823eed9bcfa005d189517ad011be [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "4fda818499edd5343b5abb12c2703b8d1e3d823eed9bcfa005d189517ad011be", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4fda818499edd5343b5abb12c2703b8d1e3d823eed9bcfa005d189517ad011be", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4fda818499edd5343b5abb12c2703b8d1e3d823eed9bcfa005d189517ad011be", kill_on_drop: false }` [INFO] [stdout] 4fda818499edd5343b5abb12c2703b8d1e3d823eed9bcfa005d189517ad011be [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/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" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "rustops/crates-build-env@sha256:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+9fa580b1175018b0a276b0bc68f9827a106f7260" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 75331e93a756f469e8f6dc611e1a1bec90151a1bb52c8ecc4a9e2adb685350f4 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "75331e93a756f469e8f6dc611e1a1bec90151a1bb52c8ecc4a9e2adb685350f4", kill_on_drop: false }` [INFO] [stderr] Checking rust_server v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0432]: unresolved import `super::method::MethodError` [INFO] [stdout] --> src/http/request.rs:1:29 [INFO] [stdout] | [INFO] [stdout] 1 | use super::method::{Method, MethodError}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | no `MethodError` in `http::method` [INFO] [stdout] | help: a similar name exists in the module: `MethodErorr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0726]: implicit elided lifetime not allowed here [INFO] [stdout] --> src/http/request.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | impl Request { [INFO] [stdout] | ^^^^^^^- help: indicate the anonymous lifetime: `<'_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Display`, `Formatter`, `Result as FmtResult` [INFO] [stdout] --> src/http/response.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Display, Formatter, Result as FmtResult}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::net::TcpStream` [INFO] [stdout] --> src/http/response.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::net::TcpStream; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `super::method::MethodError` [INFO] [stdout] --> src/http/request.rs:1:29 [INFO] [stdout] | [INFO] [stdout] 1 | use super::method::{Method, MethodError}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | no `MethodError` in `http::method` [INFO] [stdout] | help: a similar name exists in the module: `MethodErorr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0726]: implicit elided lifetime not allowed here [INFO] [stdout] --> src/http/request.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | impl Request { [INFO] [stdout] | ^^^^^^^- help: indicate the anonymous lifetime: `<'_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Display`, `Formatter`, `Result as FmtResult` [INFO] [stdout] --> src/http/response.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Display, Formatter, Result as FmtResult}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::net::TcpStream` [INFO] [stdout] --> src/http/response.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::net::TcpStream; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `String: From` is not satisfied [INFO] [stdout] --> src/http/method.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | _ => Err(String::from(MethodErorr)), [INFO] [stdout] | ^^^^^^^^^^^^ the trait `From` is not implemented for `String` [INFO] [stdout] | [INFO] [stdout] = help: the following implementations were found: [INFO] [stdout] > [INFO] [stdout] > [INFO] [stdout] > [INFO] [stdout] >> [INFO] [stdout] and 2 others [INFO] [stdout] = note: required by `from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/request.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | self.query_string.as_ref() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected reference, found enum `Option` [INFO] [stdout] | help: consider borrowing here: `&self.query_string.as_ref()` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&Option<&QueryString<'_>>` [INFO] [stdout] found enum `Option<&QueryString<'_>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/request.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | fn from(_: Utf8Error) -> Self { [INFO] [stdout] | ---- ^^^^ expected enum `ParseError`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] 90 | Self::InvalidMethod; [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/request.rs:95:28 [INFO] [stdout] | [INFO] [stdout] 95 | fn from(_: Utf8Error) -> Self { [INFO] [stdout] | ---- ^^^^ expected enum `ParseError`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] 96 | Self::InvalidEncoding; [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/response.rs:17:50 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn send(&self, stream: &mut impl Write) -> IoResult<()>{ [INFO] [stdout] | ---- ^^^^^^^^^^^^ expected enum `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 29 | ); [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::io::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/status_code.rs:21:39 [INFO] [stdout] | [INFO] [stdout] 21 | fn fmt(&self, f: &mut Formatter) -> FmtResult { [INFO] [stdout] | --- ^^^^^^^^^ expected enum `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] 22 | write!(f, "{}", *self as u16); [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::fmt::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/server.rs:9:64 [INFO] [stdout] | [INFO] [stdout] 9 | fn handle_bad_request(&mut self, e: &ParseError) -> Response { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 10 | | println!("Failed to parse a request: {}", e); [INFO] [stdout] 11 | | Response::new(StatusCode::BadRequest, None); [INFO] [stdout] | | - help: consider removing this semicolon [INFO] [stdout] 12 | | } [INFO] [stdout] | |___^ expected struct `Response`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `send` found for unit type `()` in the current scope [INFO] [stdout] --> src/server.rs:45:40 [INFO] [stdout] | [INFO] [stdout] 45 | if let Err(e) = response.send(&mut stream) { [INFO] [stdout] | ^^^^ method not found in `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/website_handler.rs:20:11 [INFO] [stdout] | [INFO] [stdout] 19 | / if path.starts_with(&self.public_path) { [INFO] [stdout] 20 | | fs::read_to_string(path).ok() [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `Option` [INFO] [stdout] 21 | | } else { [INFO] [stdout] 22 | | println!("Error traversal attack: {}", file_path); [INFO] [stdout] 23 | | None [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________- expected this to be `()` [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found enum `Option` [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 20 | fs::read_to_string(path).ok(); [INFO] [stdout] | ^ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 24 | }; [INFO] [stdout] | ^ [INFO] [stdout] help: you might have meant to return this value [INFO] [stdout] | [INFO] [stdout] 20 | return fs::read_to_string(path).ok(); [INFO] [stdout] | ^^^^^^ ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `String: From` is not satisfied [INFO] [stdout] --> src/http/method.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | _ => Err(String::from(MethodErorr)), [INFO] [stdout] | ^^^^^^^^^^^^ the trait `From` is not implemented for `String` [INFO] [stdout] | [INFO] [stdout] = help: the following implementations were found: [INFO] [stdout] > [INFO] [stdout] > [INFO] [stdout] > [INFO] [stdout] >> [INFO] [stdout] and 2 others [INFO] [stdout] = note: required by `from` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/request.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | self.query_string.as_ref() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected reference, found enum `Option` [INFO] [stdout] | help: consider borrowing here: `&self.query_string.as_ref()` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&Option<&QueryString<'_>>` [INFO] [stdout] found enum `Option<&QueryString<'_>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/request.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | fn from(_: Utf8Error) -> Self { [INFO] [stdout] | ---- ^^^^ expected enum `ParseError`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] 90 | Self::InvalidMethod; [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/request.rs:95:28 [INFO] [stdout] | [INFO] [stdout] 95 | fn from(_: Utf8Error) -> Self { [INFO] [stdout] | ---- ^^^^ expected enum `ParseError`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] 96 | Self::InvalidEncoding; [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/response.rs:17:50 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn send(&self, stream: &mut impl Write) -> IoResult<()>{ [INFO] [stdout] | ---- ^^^^^^^^^^^^ expected enum `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 29 | ); [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::io::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/http/status_code.rs:21:39 [INFO] [stdout] | [INFO] [stdout] 21 | fn fmt(&self, f: &mut Formatter) -> FmtResult { [INFO] [stdout] | --- ^^^^^^^^^ expected enum `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] 22 | write!(f, "{}", *self as u16); [INFO] [stdout] | - help: consider removing this semicolon [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::fmt::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/server.rs:9:64 [INFO] [stdout] | [INFO] [stdout] 9 | fn handle_bad_request(&mut self, e: &ParseError) -> Response { [INFO] [stdout] | ________________________________________________________________^ [INFO] [stdout] 10 | | println!("Failed to parse a request: {}", e); [INFO] [stdout] 11 | | Response::new(StatusCode::BadRequest, None); [INFO] [stdout] | | - help: consider removing this semicolon [INFO] [stdout] 12 | | } [INFO] [stdout] | |___^ expected struct `Response`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/website_handler.rs:23:11 [INFO] [stdout] | [INFO] [stdout] 19 | / if path.starts_with(&self.public_path) { [INFO] [stdout] 20 | | fs::read_to_string(path).ok() [INFO] [stdout] 21 | | } else { [INFO] [stdout] 22 | | println!("Error traversal attack: {}", file_path); [INFO] [stdout] 23 | | None [INFO] [stdout] | | ^^^^ expected `()`, found enum `Option` [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________- expected this to be `()` [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found enum `Option<_>` [INFO] [stdout] help: you might have meant to return this value [INFO] [stdout] | [INFO] [stdout] 23 | return None; [INFO] [stdout] | ^^^^^^ ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/website_handler.rs:36:19 [INFO] [stdout] | [INFO] [stdout] 36 | match request.method() { [INFO] [stdout] | ^^^^^^ lifetime mismatch [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&Request<'static>` [INFO] [stdout] found reference `&Request<'_>` [INFO] [stdout] note: the anonymous lifetime defined on the method body at 34:42... [INFO] [stdout] --> src/website_handler.rs:34:42 [INFO] [stdout] | [INFO] [stdout] 34 | fn handle_request(&mut self, request: &Request) -> Response { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = note: ...does not necessarily outlive the static lifetime [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 13 previous errors; 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0432, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `send` found for unit type `()` in the current scope [INFO] [stdout] --> src/server.rs:45:40 [INFO] [stdout] | [INFO] [stdout] 45 | if let Err(e) = response.send(&mut stream) { [INFO] [stdout] | ^^^^ method not found in `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_server` [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/website_handler.rs:20:11 [INFO] [stdout] | [INFO] [stdout] 19 | / if path.starts_with(&self.public_path) { [INFO] [stdout] 20 | | fs::read_to_string(path).ok() [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `Option` [INFO] [stdout] 21 | | } else { [INFO] [stdout] 22 | | println!("Error traversal attack: {}", file_path); [INFO] [stdout] 23 | | None [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________- expected this to be `()` [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found enum `Option` [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 20 | fs::read_to_string(path).ok(); [INFO] [stdout] | ^ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 24 | }; [INFO] [stdout] | ^ [INFO] [stdout] help: you might have meant to return this value [INFO] [stdout] | [INFO] [stdout] 20 | return fs::read_to_string(path).ok(); [INFO] [stdout] | ^^^^^^ ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/website_handler.rs:23:11 [INFO] [stdout] | [INFO] [stdout] 19 | / if path.starts_with(&self.public_path) { [INFO] [stdout] 20 | | fs::read_to_string(path).ok() [INFO] [stdout] 21 | | } else { [INFO] [stdout] 22 | | println!("Error traversal attack: {}", file_path); [INFO] [stdout] 23 | | None [INFO] [stdout] | | ^^^^ expected `()`, found enum `Option` [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________- expected this to be `()` [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found enum `Option<_>` [INFO] [stdout] help: you might have meant to return this value [INFO] [stdout] | [INFO] [stdout] 23 | return None; [INFO] [stdout] | ^^^^^^ ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/website_handler.rs:36:19 [INFO] [stdout] | [INFO] [stdout] 36 | match request.method() { [INFO] [stdout] | ^^^^^^ lifetime mismatch [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&Request<'static>` [INFO] [stdout] found reference `&Request<'_>` [INFO] [stdout] note: the anonymous lifetime defined on the method body at 34:42... [INFO] [stdout] --> src/website_handler.rs:34:42 [INFO] [stdout] | [INFO] [stdout] 34 | fn handle_request(&mut self, request: &Request) -> Response { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = note: ...does not necessarily outlive the static lifetime [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 13 previous errors; 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0432, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "75331e93a756f469e8f6dc611e1a1bec90151a1bb52c8ecc4a9e2adb685350f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "75331e93a756f469e8f6dc611e1a1bec90151a1bb52c8ecc4a9e2adb685350f4", kill_on_drop: false }` [INFO] [stdout] 75331e93a756f469e8f6dc611e1a1bec90151a1bb52c8ecc4a9e2adb685350f4