[INFO] cloning repository https://github.com/arg3nt/tftp-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/arg3nt/tftp-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Farg3nt%2Ftftp-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Farg3nt%2Ftftp-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6c3b5b79f0d31ac961466f78ff7b6f2fa309de83 [INFO] linting arg3nt/tftp-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Farg3nt%2Ftftp-rs" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/arg3nt/tftp-rs [INFO] finished tweaking git repo https://github.com/arg3nt/tftp-rs [INFO] tweaked toml for git repo https://github.com/arg3nt/tftp-rs written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/arg3nt/tftp-rs 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/arg3nt/tftp-rs 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 0fe15bed20face21df2e7678f5eb9100466cd3bef39af761e5313c1b855b1f35 [INFO] running `Command { std: "docker" "start" "-a" "0fe15bed20face21df2e7678f5eb9100466cd3bef39af761e5313c1b855b1f35", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0fe15bed20face21df2e7678f5eb9100466cd3bef39af761e5313c1b855b1f35", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0fe15bed20face21df2e7678f5eb9100466cd3bef39af761e5313c1b855b1f35", kill_on_drop: false }` [INFO] [stdout] 0fe15bed20face21df2e7678f5eb9100466cd3bef39af761e5313c1b855b1f35 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 147cd692a1d0e306d0e6826cfc91cb5d8b78929bd77106a9aa2e6389b275a240 [INFO] running `Command { std: "docker" "start" "-a" "147cd692a1d0e306d0e6826cfc91cb5d8b78929bd77106a9aa2e6389b275a240", kill_on_drop: false }` [INFO] [stderr] Compiling crossbeam-utils v0.8.20 [INFO] [stderr] Checking regex-syntax v0.8.4 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Checking linux-raw-sys v0.4.14 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Checking anstyle-query v1.1.0 [INFO] [stderr] Compiling anyhow v1.0.86 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Compiling syn v2.0.71 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking futures-lite v2.3.0 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Checking tempdir v0.3.7 [INFO] [stderr] Checking event-listener v5.3.1 [INFO] [stderr] Checking event-listener-strategy v0.5.2 [INFO] [stderr] Checking async-lock v3.4.0 [INFO] [stderr] Checking regex-automata v0.4.7 [INFO] [stderr] Compiling tokio-macros v2.3.0 [INFO] [stderr] Compiling async-stream-impl v0.3.5 [INFO] [stderr] Checking regex v1.10.5 [INFO] [stderr] Checking async-stream v0.3.5 [INFO] [stderr] Checking env_filter v0.1.0 [INFO] [stderr] Checking env_logger v0.11.3 [INFO] [stderr] Checking tokio v1.38.1 [INFO] [stderr] Checking polling v3.7.2 [INFO] [stderr] Checking async-io v2.3.3 [INFO] [stderr] Checking tokio-stream v0.1.15 [INFO] [stderr] Checking tokio-test v0.4.4 [INFO] [stderr] Checking tftp-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/processor.rs:215:64 [INFO] [stdout] | [INFO] [stdout] 215 | match write_block_to_file(&mut self.f, &data).await { [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/tftp.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn from_str(s: &String) -> TftpResult { [INFO] [stdout] 57 | | match s.as_str() { [INFO] [stdout] 58 | | "netascii" => Ok(FileMode::NetAscii), [INFO] [stdout] 59 | | "octet" => Ok(FileMode::Octet), [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [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: implementation of inherent method `to_string(&self) -> String` for type `tftp::FileMode` [INFO] [stdout] --> src/tftp.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn to_string(&self) -> String { [INFO] [stdout] 66 | | match self { [INFO] [stdout] 67 | | Self::NetAscii => "netascii", [INFO] [stdout] 68 | | Self::Octet => "octet", [INFO] [stdout] 69 | | Self::Mail => "mail", [INFO] [stdout] 70 | | }.to_string() [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `tftp::FileMode` 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: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/tftp.rs:300:14 [INFO] [stdout] | [INFO] [stdout] 300 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 300 - for i in 0..buf.len() { [INFO] [stdout] 300 + for (i, ) in buf.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tftp.rs:324:14 [INFO] [stdout] | [INFO] [stdout] 324 | _ => return Err(SocketError::PacketParse( [INFO] [stdout] | ______________^ [INFO] [stdout] 325 | | format!("Uknown opcode retrieved: {rawcode}").to_string())), [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] 324 ~ _ => Err(SocketError::PacketParse( [INFO] [stdout] 325 ~ format!("Uknown opcode retrieved: {rawcode}").to_string())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:331:48 [INFO] [stdout] | [INFO] [stdout] 331 | let (path, path_size) = string_from_buffer(&buf); [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:396:43 [INFO] [stdout] | [INFO] [stdout] 396 | OpCode::Rrq => parse_read_req(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:397:44 [INFO] [stdout] | [INFO] [stdout] 397 | OpCode::Wrq => parse_write_req(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:398:40 [INFO] [stdout] | [INFO] [stdout] 398 | OpCode::Data => parse_data(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:399:38 [INFO] [stdout] | [INFO] [stdout] 399 | OpCode::Ack => parse_ack(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:400:42 [INFO] [stdout] | [INFO] [stdout] 400 | OpCode::Error => parse_error(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:401:40 [INFO] [stdout] | [INFO] [stdout] 401 | OpCode::OAck => parse_oack(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 boolean expression can be simplified [INFO] [stdout] --> src/srv_conn.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | while !sock.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `sock.is_err()` [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: non-binding `let` on a future [INFO] [stdout] --> src/srv_conn.rs:149:17 [INFO] [stdout] | [INFO] [stdout] 149 | let _ = self.sock.send(&p, self.dst); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | ... return; [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] 173 ~ log::warn!("Handler initialization error: {:#?}", e); [INFO] [stdout] 174 | }, [INFO] [stdout] 175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:167:53 [INFO] [stdout] | [INFO] [stdout] 167 | match ServerRequestHandler::new(&Path::new("/tmp/tftp/"), &packet, peer).await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("/tmp/tftp/")` [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: function `test_packet_read_req_with_blksize` is never used [INFO] [stdout] --> src/tftp.rs:507:8 [INFO] [stdout] | [INFO] [stdout] 507 | fn test_packet_read_req_with_blksize() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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/processor.rs:215:64 [INFO] [stdout] | [INFO] [stdout] 215 | match write_block_to_file(&mut self.f, &data).await { [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/processor.rs:288:46 [INFO] [stdout] | [INFO] [stdout] 288 | PacketProcessor::new_for_reading(&Path::new("/some/invalid/file.txt"), tftp::ReqOptions::none()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("/some/invalid/file.txt")` [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: needless call to `as_bytes` [INFO] [stdout] --> src/processor.rs:316:13 [INFO] [stdout] | [INFO] [stdout] 316 | contents.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `contents.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/processor.rs:353:13 [INFO] [stdout] | [INFO] [stdout] 353 | contents.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `contents.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/processor.rs:414:13 [INFO] [stdout] | [INFO] [stdout] 414 | contents.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `contents.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/processor.rs:451:13 [INFO] [stdout] | [INFO] [stdout] 451 | contents.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `contents.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/processor.rs:497:13 [INFO] [stdout] | [INFO] [stdout] 497 | contents.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `contents.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/processor.rs:525:46 [INFO] [stdout] | [INFO] [stdout] 525 | PacketProcessor::new_for_writing(&Path::new("/some/invalid/path.txt"), tftp::ReqOptions::none()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("/some/invalid/path.txt")` [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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/tftp.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn from_str(s: &String) -> TftpResult { [INFO] [stdout] 57 | | match s.as_str() { [INFO] [stdout] 58 | | "netascii" => Ok(FileMode::NetAscii), [INFO] [stdout] 59 | | "octet" => Ok(FileMode::Octet), [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [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: implementation of inherent method `to_string(&self) -> String` for type `tftp::FileMode` [INFO] [stdout] --> src/tftp.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn to_string(&self) -> String { [INFO] [stdout] 66 | | match self { [INFO] [stdout] 67 | | Self::NetAscii => "netascii", [INFO] [stdout] 68 | | Self::Octet => "octet", [INFO] [stdout] 69 | | Self::Mail => "mail", [INFO] [stdout] 70 | | }.to_string() [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `tftp::FileMode` 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: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/tftp.rs:300:14 [INFO] [stdout] | [INFO] [stdout] 300 | for i in 0..buf.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 300 - for i in 0..buf.len() { [INFO] [stdout] 300 + for (i, ) in buf.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tftp.rs:324:14 [INFO] [stdout] | [INFO] [stdout] 324 | _ => return Err(SocketError::PacketParse( [INFO] [stdout] | ______________^ [INFO] [stdout] 325 | | format!("Uknown opcode retrieved: {rawcode}").to_string())), [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] 324 ~ _ => Err(SocketError::PacketParse( [INFO] [stdout] 325 ~ format!("Uknown opcode retrieved: {rawcode}").to_string())), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:331:48 [INFO] [stdout] | [INFO] [stdout] 331 | let (path, path_size) = string_from_buffer(&buf); [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:396:43 [INFO] [stdout] | [INFO] [stdout] 396 | OpCode::Rrq => parse_read_req(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:397:44 [INFO] [stdout] | [INFO] [stdout] 397 | OpCode::Wrq => parse_write_req(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:398:40 [INFO] [stdout] | [INFO] [stdout] 398 | OpCode::Data => parse_data(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:399:38 [INFO] [stdout] | [INFO] [stdout] 399 | OpCode::Ack => parse_ack(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:400:42 [INFO] [stdout] | [INFO] [stdout] 400 | OpCode::Error => parse_error(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tftp.rs:401:40 [INFO] [stdout] | [INFO] [stdout] 401 | OpCode::OAck => parse_oack(&buf), [INFO] [stdout] | ^^^^ help: change this to: `buf` [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 boolean expression can be simplified [INFO] [stdout] --> src/tftp.rs:578:17 [INFO] [stdout] | [INFO] [stdout] 578 | assert!(!Packet::parse_from_buf(&vec![0x10]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Packet::parse_from_buf(&vec![0x10]).is_err()` [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 boolean expression can be simplified [INFO] [stdout] --> src/tftp.rs:579:17 [INFO] [stdout] | [INFO] [stdout] 579 | assert!(!Packet::parse_from_buf(&vec![0x10, 0x00]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Packet::parse_from_buf(&vec![0x10, 0x00]).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tftp.rs:580:17 [INFO] [stdout] | [INFO] [stdout] 580 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x09]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Packet::parse_from_buf(&vec![0x00, 0x09]).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tftp.rs:582:17 [INFO] [stdout] | [INFO] [stdout] 582 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69]).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tftp.rs:584:17 [INFO] [stdout] | [INFO] [stdout] 584 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69, 0x00]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69, 0x00]).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tftp.rs:586:17 [INFO] [stdout] | [INFO] [stdout] 586 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69, 0x00, 0x62, 0x61, 0x64, 0x00 ]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69, 0x00, 0x62, 0x61, 0x64, 0x00 ]).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/srv_conn.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | while !sock.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `sock.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> src/srv_conn.rs:149:17 [INFO] [stdout] | [INFO] [stdout] 149 | let _ = self.sock.send(&p, self.dst); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | ... return; [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] 173 ~ log::warn!("Handler initialization error: {:#?}", e); [INFO] [stdout] 174 | }, [INFO] [stdout] 175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:167:53 [INFO] [stdout] | [INFO] [stdout] 167 | match ServerRequestHandler::new(&Path::new("/tmp/tftp/"), &packet, peer).await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("/tmp/tftp/")` [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: useless use of `vec!` [INFO] [stdout] --> src/tftp.rs:578:41 [INFO] [stdout] | [INFO] [stdout] 578 | assert!(!Packet::parse_from_buf(&vec![0x10]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^ help: you can use a slice directly: `&[0x10]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tftp.rs:579:41 [INFO] [stdout] | [INFO] [stdout] 579 | assert!(!Packet::parse_from_buf(&vec![0x10, 0x00]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0x10, 0x00]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tftp.rs:580:41 [INFO] [stdout] | [INFO] [stdout] 580 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x09]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0x00, 0x09]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tftp.rs:582:41 [INFO] [stdout] | [INFO] [stdout] 582 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0x00, 0x01, 0x68, 0x69]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tftp.rs:584:41 [INFO] [stdout] | [INFO] [stdout] 584 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69, 0x00]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0x00, 0x01, 0x68, 0x69, 0x00]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tftp.rs:586:41 [INFO] [stdout] | [INFO] [stdout] 586 | assert!(!Packet::parse_from_buf(&vec![0x00, 0x01, 0x68, 0x69, 0x00, 0x62, 0x61, 0x64, 0x00 ]).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0x00, 0x01, 0x68, 0x69, 0x00, 0x62, 0x61, 0x64, 0x00]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.15s [INFO] running `Command { std: "docker" "inspect" "147cd692a1d0e306d0e6826cfc91cb5d8b78929bd77106a9aa2e6389b275a240", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "147cd692a1d0e306d0e6826cfc91cb5d8b78929bd77106a9aa2e6389b275a240", kill_on_drop: false }` [INFO] [stdout] 147cd692a1d0e306d0e6826cfc91cb5d8b78929bd77106a9aa2e6389b275a240