[INFO] cloning repository https://github.com/lehrbaumm/KYP_UE1 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lehrbaumm/KYP_UE1" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flehrbaumm%2FKYP_UE1", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flehrbaumm%2FKYP_UE1'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 82133a9bb4f0a84368cb25415616b8792beb45d6 [INFO] linting lehrbaumm/KYP_UE1 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flehrbaumm%2FKYP_UE1" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lehrbaumm/KYP_UE1 [INFO] finished tweaking git repo https://github.com/lehrbaumm/KYP_UE1 [INFO] tweaked toml for git repo https://github.com/lehrbaumm/KYP_UE1 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lehrbaumm/KYP_UE1 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/lehrbaumm/KYP_UE1 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded utf8-ranges v1.0.2 [INFO] [stderr] Downloaded lazy_static v1.3.0 [INFO] [stderr] Downloaded thread_local v0.3.6 [INFO] [stderr] Downloaded aho-corasick v0.6.10 [INFO] [stderr] Downloaded memchr v2.2.0 [INFO] [stderr] Downloaded safemem v0.2.0 [INFO] [stderr] Downloaded failure_derive v0.1.5 [INFO] [stderr] Downloaded cfg-if v0.1.7 [INFO] [stderr] Downloaded autocfg v0.1.2 [INFO] [stderr] Downloaded mach v0.2.3 [INFO] [stderr] Downloaded byteorder v1.3.1 [INFO] [stderr] Downloaded slice-deque v0.1.16 [INFO] [stderr] Downloaded backtrace v0.3.14 [INFO] [stderr] Downloaded proc-macro2 v0.4.27 [INFO] [stderr] Downloaded quote v0.6.11 [INFO] [stderr] Downloaded synstructure v0.10.1 [INFO] [stderr] Downloaded failure v0.1.5 [INFO] [stderr] Downloaded syn v0.15.29 [INFO] [stderr] Downloaded cc v1.0.32 [INFO] [stderr] Downloaded regex v1.1.2 [INFO] [stderr] Downloaded buf_redux v0.7.1 [INFO] [stderr] Downloaded log v0.4.6 [INFO] [stderr] Downloaded pcarp v1.0.1 [INFO] [stderr] Downloaded ucd-util v0.1.3 [INFO] [stderr] Downloaded rustc-demangle v0.1.13 [INFO] [stderr] Downloaded regex-syntax v0.6.5 [INFO] [stderr] Downloaded libc v0.2.50 [INFO] [stderr] Downloaded backtrace-sys v0.1.28 [INFO] [stderr] Downloaded winapi v0.3.6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 6a0b9a40bf9cc39b8ea5460669a297008fd68d501a51fe56776d122ef5529702 [INFO] running `Command { std: "docker" "start" "-a" "6a0b9a40bf9cc39b8ea5460669a297008fd68d501a51fe56776d122ef5529702", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6a0b9a40bf9cc39b8ea5460669a297008fd68d501a51fe56776d122ef5529702", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6a0b9a40bf9cc39b8ea5460669a297008fd68d501a51fe56776d122ef5529702", kill_on_drop: false }` [INFO] [stdout] 6a0b9a40bf9cc39b8ea5460669a297008fd68d501a51fe56776d122ef5529702 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 51f4846a9fba0772d110425efebb6b30068717c3c6bab04b0e52c384fec023cf [INFO] running `Command { std: "docker" "start" "-a" "51f4846a9fba0772d110425efebb6b30068717c3c6bab04b0e52c384fec023cf", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.50 [INFO] [stderr] Compiling proc-macro2 v0.4.27 [INFO] [stderr] Compiling unicode-xid v0.1.0 [INFO] [stderr] Compiling syn v0.15.29 [INFO] [stderr] Compiling cc v1.0.32 [INFO] [stderr] Compiling memchr v2.2.0 [INFO] [stderr] Compiling autocfg v0.1.2 [INFO] [stderr] Checking cfg-if v0.1.7 [INFO] [stderr] Compiling failure_derive v0.1.5 [INFO] [stderr] Checking rustc-demangle v0.1.13 [INFO] [stderr] Compiling byteorder v1.3.1 [INFO] [stderr] Compiling backtrace v0.3.14 [INFO] [stderr] Checking ucd-util v0.1.3 [INFO] [stderr] Checking safemem v0.2.0 [INFO] [stderr] Compiling regex v1.1.2 [INFO] [stderr] Checking lazy_static v1.3.0 [INFO] [stderr] Checking thread_local v0.3.6 [INFO] [stderr] Checking regex-syntax v0.6.5 [INFO] [stderr] Checking log v0.4.6 [INFO] [stderr] Checking slice-deque v0.1.16 [INFO] [stderr] Checking utf8-ranges v1.0.2 [INFO] [stderr] Checking aho-corasick v0.6.10 [INFO] [stderr] Checking buf_redux v0.7.1 [INFO] [stderr] Compiling backtrace-sys v0.1.28 [INFO] [stderr] Compiling quote v0.6.11 [INFO] [stderr] Compiling synstructure v0.10.1 [INFO] [stderr] Checking failure v0.1.5 [INFO] [stderr] Checking pcarp v1.0.1 [INFO] [stderr] Checking kyp6_ue1 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/network/tcp.rs:33:31 [INFO] [stdout] | [INFO] [stdout] 33 | options.push(data[(54+i as usize)]); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 33 - options.push(data[(54+i as usize)]); [INFO] [stdout] 33 + options.push(data[54+i as usize ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/network/tcp.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 41 - (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] 41 + self.source_port == other.destination_port && self.destination_port == other.source_port [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/network/udp.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 23 - (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] 23 + self.source_port == other.destination_port && self.destination_port == other.source_port [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/network/tcp.rs:33:31 [INFO] [stdout] | [INFO] [stdout] 33 | options.push(data[(54+i as usize)]); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 33 - options.push(data[(54+i as usize)]); [INFO] [stdout] 33 + options.push(data[54+i as usize ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/network/tcp.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 41 - (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] 41 + self.source_port == other.destination_port && self.destination_port == other.source_port [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/network/udp.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 23 - (self.source_port == other.destination_port && self.destination_port == other.source_port) [INFO] [stdout] 23 + self.source_port == other.destination_port && self.destination_port == other.source_port [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `payload_length`, `identification`, `hop_limit`, `source_ip`, and `destination_ip` are never read [INFO] [stdout] --> src/network/ip.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 96 | pub struct IP6Header { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 97 | pub header_info: u32, // 4 Bit Version, 8 Bit Traffic Class, 20 Bit Flow Label [INFO] [stdout] 98 | pub payload_length: u16, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 99 | pub identification: u16, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 100 | pub next_header: u8, [INFO] [stdout] 101 | pub hop_limit: u8, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 102 | pub source_ip: [u8; 16], [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 103 | pub destination_ip: [u8; 16] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `IP6Header` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/network/udp.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl UDPHeader { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 12 | pub fn new(data: &[u8]) -> UDPHeader { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/ip.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | write!(f, "Identification: {:04X}\n", self.identification)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 66 - write!(f, "Identification: {:04X}\n", self.identification)?; [INFO] [stdout] 66 + writeln!(f, "Identification: {:04X}", self.identification)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/ip.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | write!(f, "\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 128 - write!(f, "\n") [INFO] [stdout] 128 + writeln!(f) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/network/tcp.rs:33:35 [INFO] [stdout] | [INFO] [stdout] 33 | options.push(data[(54+i as usize)]); [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/tcp.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | write!(f, "Header Length: {} Bytes\n", self.header_length>>2)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 51 - write!(f, "Header Length: {} Bytes\n", self.header_length>>2)?; [INFO] [stdout] 51 + writeln!(f, "Header Length: {} Bytes", self.header_length>>2)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/tcp.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | write!(f, "Urgent Pointer: 0x{:04X}\n", self.urgent_pointer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 56 - write!(f, "Urgent Pointer: 0x{:04X}\n", self.urgent_pointer)?; [INFO] [stdout] 56 + writeln!(f, "Urgent Pointer: 0x{:04X}", self.urgent_pointer)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/udp.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | write!(f, "Length: {} Bytes\n", self.length)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 31 - write!(f, "Length: {} Bytes\n", self.length)?; [INFO] [stdout] 31 + writeln!(f, "Length: {} Bytes", self.length)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | write!(f, "Length: {}\n", self.len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 14 - write!(f, "Length: {}\n", self.len) [INFO] [stdout] 14 + writeln!(f, "Length: {}", self.len) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | write!(f, "Count: {}\n", self.count)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 29 - write!(f, "Count: {}\n", self.count)?; [INFO] [stdout] 29 + writeln!(f, "Count: {}", self.count)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | write!(f, "Counter: {}\n", self.counter)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 47 - write!(f, "Counter: {}\n", self.counter)?; [INFO] [stdout] 47 + writeln!(f, "Counter: {}", self.counter)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | write!(f, "Ciphertext: {:02X?}\n", self.ciphertext)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 48 - write!(f, "Ciphertext: {:02X?}\n", self.ciphertext)?; [INFO] [stdout] 48 + writeln!(f, "Ciphertext: {:02X?}", self.ciphertext)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:250:32 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(buf <= 'Z' as u8 && buf >= 'A' as u8 || buf <= 'z' as u8 && buf >= 'a' as u8)` [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/main.rs:250:118 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `(buf != 0x20)` [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/main.rs:327:36 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(buf <= 'Z' as u8 && buf >= 'A' as u8 || buf <= 'z' as u8 && buf >= 'a' as u8)` [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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | tunnel_header.sender = String::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `sec_tunnel::SecureTunnelHeader { sender: String::new(), receiver: String::new(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/main.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let mut tunnel_header: SecureTunnelHeader = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` 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/main.rs:29:46 [INFO] [stdout] | [INFO] [stdout] 29 | let eth_header = EthernetHeader::new(&pkt.data); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.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/main.rs:32:51 [INFO] [stdout] | [INFO] [stdout] 32 | 0x0800 => IPHeader::V4(IP4Header::new(&pkt.data)), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.data` [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/main.rs:33:51 [INFO] [stdout] | [INFO] [stdout] 33 | 0x86DD => IPHeader::V6(IP6Header::new(&pkt.data)), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.data` [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/main.rs:38:33 [INFO] [stdout] | [INFO] [stdout] 38 | 6 => TCPHeader::new(&pkt.data), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.data` [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 call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/main.rs:98:35 [INFO] [stdout] | [INFO] [stdout] 98 | configuration.count = u32::from_str_radix(&packet_count, 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `packet_count.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/main.rs:129:30 [INFO] [stdout] | [INFO] [stdout] 129 | buffer.counter = u32::from_str_radix(&count_buffer, 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `count_buffer.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/main.rs:181:16 [INFO] [stdout] | [INFO] [stdout] 181 | } for i in 0..data.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] 181 - } for i in 0..data.len() { [INFO] [stdout] 181 + } for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `tst` [INFO] [stdout] --> src/main.rs:184:18 [INFO] [stdout] | [INFO] [stdout] 184 | for j in 0..data[i].ciphertext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 184 - for j in 0..data[i].ciphertext.len() { [INFO] [stdout] 184 + for (j, ) in tst.iter_mut().enumerate().take(data[i].ciphertext.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/main.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 190 | plaintext.push(35); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![35;SIZE]` [INFO] [stdout] = help: or `plaintext.extend(std::iter::repeat_n(35, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `payload_length`, `identification`, `hop_limit`, `source_ip`, and `destination_ip` are never read [INFO] [stdout] --> src/network/ip.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 96 | pub struct IP6Header { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 97 | pub header_info: u32, // 4 Bit Version, 8 Bit Traffic Class, 20 Bit Flow Label [INFO] [stdout] 98 | pub payload_length: u16, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 99 | pub identification: u16, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 100 | pub next_header: u8, [INFO] [stdout] 101 | pub hop_limit: u8, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 102 | pub source_ip: [u8; 16], [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 103 | pub destination_ip: [u8; 16] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `IP6Header` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/network/udp.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl UDPHeader { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 12 | pub fn new(data: &[u8]) -> UDPHeader { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:202:27 [INFO] [stdout] | [INFO] [stdout] 202 | if buf <= 'z' as u8 && buf >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:202:47 [INFO] [stdout] | [INFO] [stdout] 202 | if buf <= 'z' as u8 && buf >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:204:32 [INFO] [stdout] | [INFO] [stdout] 204 | if plain < 'Z' as u8 && plain > 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:204:53 [INFO] [stdout] | [INFO] [stdout] 204 | if plain < 'Z' as u8 && plain > 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `m` is only used to index `tst` [INFO] [stdout] --> src/main.rs:207:34 [INFO] [stdout] | [INFO] [stdout] 207 | for m in 0..tst[i].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 207 - for m in 0..tst[i].len() { [INFO] [stdout] 207 + for in tst.iter().take(tst[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:209:41 [INFO] [stdout] | [INFO] [stdout] 209 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:209:63 [INFO] [stdout] | [INFO] [stdout] 209 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:212:41 [INFO] [stdout] | [INFO] [stdout] 212 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:212:63 [INFO] [stdout] | [INFO] [stdout] 212 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:223:34 [INFO] [stdout] | [INFO] [stdout] 223 | } else if buf <= 'Z' as u8 && buf >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:223:54 [INFO] [stdout] | [INFO] [stdout] 223 | } else if buf <= 'Z' as u8 && buf >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:225:32 [INFO] [stdout] | [INFO] [stdout] 225 | if plain < 'z' as u8 && plain > 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:225:53 [INFO] [stdout] | [INFO] [stdout] 225 | if plain < 'z' as u8 && plain > 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `m` is only used to index `tst` [INFO] [stdout] --> src/main.rs:228:34 [INFO] [stdout] | [INFO] [stdout] 228 | for m in 0..tst[i].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 228 - for m in 0..tst[i].len() { [INFO] [stdout] 228 + for in tst.iter().take(tst[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:230:41 [INFO] [stdout] | [INFO] [stdout] 230 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:230:63 [INFO] [stdout] | [INFO] [stdout] 230 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:233:41 [INFO] [stdout] | [INFO] [stdout] 233 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:233:63 [INFO] [stdout] | [INFO] [stdout] 233 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:244:24 [INFO] [stdout] | [INFO] [stdout] 244 | } else if buf == 0x00 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 245 | | if cipher_key[i] == 0xFF { [INFO] [stdout] 246 | | let key = tst[i][j] ^ 0x20; [INFO] [stdout] 247 | | let mut valid = true; [INFO] [stdout] ... | [INFO] [stdout] 259 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 244 ~ } else if buf == 0x00 [INFO] [stdout] 245 ~ && cipher_key[i] == 0xFF { [INFO] [stdout] 246 | let key = tst[i][j] ^ 0x20; [INFO] [stdout] ... [INFO] [stdout] 257 | } [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/ip.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | write!(f, "Identification: {:04X}\n", self.identification)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 66 - write!(f, "Identification: {:04X}\n", self.identification)?; [INFO] [stdout] 66 + writeln!(f, "Identification: {:04X}", self.identification)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `m` is only used to index `tst` [INFO] [stdout] --> src/main.rs:248:34 [INFO] [stdout] | [INFO] [stdout] 248 | for m in 0..tst[i].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 248 - for m in 0..tst[i].len() { [INFO] [stdout] 248 + for in tst.iter().take(tst[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:41 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:61 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:84 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:104 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `plaintext` [INFO] [stdout] --> src/main.rs:273:14 [INFO] [stdout] | [INFO] [stdout] 273 | for i in 0..plaintext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 273 - for i in 0..plaintext.len() { [INFO] [stdout] 273 + for (i, ) in plaintext.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:276:13 [INFO] [stdout] | [INFO] [stdout] 276 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `plaintext` [INFO] [stdout] --> src/main.rs:298:22 [INFO] [stdout] | [INFO] [stdout] 298 | for j in start..data[0].ciphertext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 298 - for j in start..data[0].ciphertext.len() { [INFO] [stdout] 298 + for (j, ) in plaintext.iter().enumerate().take(data[0].ciphertext.len()).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/ip.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | write!(f, "\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 128 - write!(f, "\n") [INFO] [stdout] 128 + writeln!(f) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth().unwrap()` on a `String` [INFO] [stdout] --> src/main.rs:323:51 [INFO] [stdout] | [INFO] [stdout] 323 | ... let key = tst[j][0] ^ possible_word.bytes().nth(j-start).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `possible_word.as_bytes()[j-start]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] = note: `#[warn(clippy::bytes_nth)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `tst` [INFO] [stdout] --> src/main.rs:325:38 [INFO] [stdout] | [INFO] [stdout] 325 | ... for k in 1..tst[j].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 325 - for k in 1..tst[j].len() { [INFO] [stdout] 325 + for in tst.iter().take(tst[j].len()).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:45 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:65 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:88 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:108 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth().unwrap()` on a `String` [INFO] [stdout] --> src/main.rs:342:55 [INFO] [stdout] | [INFO] [stdout] 342 | ... let key = tst[j][0] ^ possible_word.bytes().nth(j-start).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `possible_word.as_bytes()[j-start]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:356:5 [INFO] [stdout] | [INFO] [stdout] 356 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `plaintext` [INFO] [stdout] --> src/main.rs:366:14 [INFO] [stdout] | [INFO] [stdout] 366 | for i in 0..plaintext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 366 - for i in 0..plaintext.len() { [INFO] [stdout] 366 + for (i, ) in plaintext.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:369:13 [INFO] [stdout] | [INFO] [stdout] 369 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/network/tcp.rs:33:35 [INFO] [stdout] | [INFO] [stdout] 33 | options.push(data[(54+i as usize)]); [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:373:5 [INFO] [stdout] | [INFO] [stdout] 373 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/tcp.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | write!(f, "Header Length: {} Bytes\n", self.header_length>>2)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 51 - write!(f, "Header Length: {} Bytes\n", self.header_length>>2)?; [INFO] [stdout] 51 + writeln!(f, "Header Length: {} Bytes", self.header_length>>2)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/tcp.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | write!(f, "Urgent Pointer: 0x{:04X}\n", self.urgent_pointer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 56 - write!(f, "Urgent Pointer: 0x{:04X}\n", self.urgent_pointer)?; [INFO] [stdout] 56 + writeln!(f, "Urgent Pointer: 0x{:04X}", self.urgent_pointer)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/network/udp.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | write!(f, "Length: {} Bytes\n", self.length)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 31 - write!(f, "Length: {} Bytes\n", self.length)?; [INFO] [stdout] 31 + writeln!(f, "Length: {} Bytes", self.length)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | write!(f, "Length: {}\n", self.len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 14 - write!(f, "Length: {}\n", self.len) [INFO] [stdout] 14 + writeln!(f, "Length: {}", self.len) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | write!(f, "Count: {}\n", self.count)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 29 - write!(f, "Count: {}\n", self.count)?; [INFO] [stdout] 29 + writeln!(f, "Count: {}", self.count)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | write!(f, "Counter: {}\n", self.counter)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 47 - write!(f, "Counter: {}\n", self.counter)?; [INFO] [stdout] 47 + writeln!(f, "Counter: {}", self.counter)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/sec_tunnel.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | write!(f, "Ciphertext: {:02X?}\n", self.ciphertext)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 48 - write!(f, "Ciphertext: {:02X?}\n", self.ciphertext)?; [INFO] [stdout] 48 + writeln!(f, "Ciphertext: {:02X?}", self.ciphertext)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:250:32 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(buf <= 'Z' as u8 && buf >= 'A' as u8 || buf <= 'z' as u8 && buf >= 'a' as u8)` [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/main.rs:250:118 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `(buf != 0x20)` [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/main.rs:327:36 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(buf <= 'Z' as u8 && buf >= 'A' as u8 || buf <= 'z' as u8 && buf >= 'a' as u8)` [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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | tunnel_header.sender = String::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `sec_tunnel::SecureTunnelHeader { sender: String::new(), receiver: String::new(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/main.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let mut tunnel_header: SecureTunnelHeader = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` 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/main.rs:29:46 [INFO] [stdout] | [INFO] [stdout] 29 | let eth_header = EthernetHeader::new(&pkt.data); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.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/main.rs:32:51 [INFO] [stdout] | [INFO] [stdout] 32 | 0x0800 => IPHeader::V4(IP4Header::new(&pkt.data)), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.data` [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/main.rs:33:51 [INFO] [stdout] | [INFO] [stdout] 33 | 0x86DD => IPHeader::V6(IP6Header::new(&pkt.data)), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.data` [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/main.rs:38:33 [INFO] [stdout] | [INFO] [stdout] 38 | 6 => TCPHeader::new(&pkt.data), [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkt.data` [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 call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/main.rs:98:35 [INFO] [stdout] | [INFO] [stdout] 98 | configuration.count = u32::from_str_radix(&packet_count, 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `packet_count.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/main.rs:129:30 [INFO] [stdout] | [INFO] [stdout] 129 | buffer.counter = u32::from_str_radix(&count_buffer, 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `count_buffer.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/main.rs:181:16 [INFO] [stdout] | [INFO] [stdout] 181 | } for i in 0..data.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] 181 - } for i in 0..data.len() { [INFO] [stdout] 181 + } for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `tst` [INFO] [stdout] --> src/main.rs:184:18 [INFO] [stdout] | [INFO] [stdout] 184 | for j in 0..data[i].ciphertext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 184 - for j in 0..data[i].ciphertext.len() { [INFO] [stdout] 184 + for (j, ) in tst.iter_mut().enumerate().take(data[i].ciphertext.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/main.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 190 | plaintext.push(35); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![35;SIZE]` [INFO] [stdout] = help: or `plaintext.extend(std::iter::repeat_n(35, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:202:27 [INFO] [stdout] | [INFO] [stdout] 202 | if buf <= 'z' as u8 && buf >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:202:47 [INFO] [stdout] | [INFO] [stdout] 202 | if buf <= 'z' as u8 && buf >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:204:32 [INFO] [stdout] | [INFO] [stdout] 204 | if plain < 'Z' as u8 && plain > 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:204:53 [INFO] [stdout] | [INFO] [stdout] 204 | if plain < 'Z' as u8 && plain > 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `m` is only used to index `tst` [INFO] [stdout] --> src/main.rs:207:34 [INFO] [stdout] | [INFO] [stdout] 207 | for m in 0..tst[i].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 207 - for m in 0..tst[i].len() { [INFO] [stdout] 207 + for in tst.iter().take(tst[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:209:41 [INFO] [stdout] | [INFO] [stdout] 209 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:209:63 [INFO] [stdout] | [INFO] [stdout] 209 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:212:41 [INFO] [stdout] | [INFO] [stdout] 212 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:212:63 [INFO] [stdout] | [INFO] [stdout] 212 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:223:34 [INFO] [stdout] | [INFO] [stdout] 223 | } else if buf <= 'Z' as u8 && buf >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:223:54 [INFO] [stdout] | [INFO] [stdout] 223 | } else if buf <= 'Z' as u8 && buf >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:225:32 [INFO] [stdout] | [INFO] [stdout] 225 | if plain < 'z' as u8 && plain > 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:225:53 [INFO] [stdout] | [INFO] [stdout] 225 | if plain < 'z' as u8 && plain > 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `m` is only used to index `tst` [INFO] [stdout] --> src/main.rs:228:34 [INFO] [stdout] | [INFO] [stdout] 228 | for m in 0..tst[i].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 228 - for m in 0..tst[i].len() { [INFO] [stdout] 228 + for in tst.iter().take(tst[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:230:41 [INFO] [stdout] | [INFO] [stdout] 230 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:230:63 [INFO] [stdout] | [INFO] [stdout] 230 | ... if plain <= 'Z' as u8 && plain >= 'A' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:233:41 [INFO] [stdout] | [INFO] [stdout] 233 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:233:63 [INFO] [stdout] | [INFO] [stdout] 233 | ... if plain <= 'z' as u8 && plain >= 'a' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:244:24 [INFO] [stdout] | [INFO] [stdout] 244 | } else if buf == 0x00 { [INFO] [stdout] | ________________________^ [INFO] [stdout] 245 | | if cipher_key[i] == 0xFF { [INFO] [stdout] 246 | | let key = tst[i][j] ^ 0x20; [INFO] [stdout] 247 | | let mut valid = true; [INFO] [stdout] ... | [INFO] [stdout] 259 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 244 ~ } else if buf == 0x00 [INFO] [stdout] 245 ~ && cipher_key[i] == 0xFF { [INFO] [stdout] 246 | let key = tst[i][j] ^ 0x20; [INFO] [stdout] ... [INFO] [stdout] 257 | } [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `m` is only used to index `tst` [INFO] [stdout] --> src/main.rs:248:34 [INFO] [stdout] | [INFO] [stdout] 248 | for m in 0..tst[i].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 248 - for m in 0..tst[i].len() { [INFO] [stdout] 248 + for in tst.iter().take(tst[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:41 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:61 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:84 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:250:104 [INFO] [stdout] | [INFO] [stdout] 250 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) && !(buf == 0x20) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `plaintext` [INFO] [stdout] --> src/main.rs:273:14 [INFO] [stdout] | [INFO] [stdout] 273 | for i in 0..plaintext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 273 - for i in 0..plaintext.len() { [INFO] [stdout] 273 + for (i, ) in plaintext.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:276:13 [INFO] [stdout] | [INFO] [stdout] 276 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `plaintext` [INFO] [stdout] --> src/main.rs:298:22 [INFO] [stdout] | [INFO] [stdout] 298 | for j in start..data[0].ciphertext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 298 - for j in start..data[0].ciphertext.len() { [INFO] [stdout] 298 + for (j, ) in plaintext.iter().enumerate().take(data[0].ciphertext.len()).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth().unwrap()` on a `String` [INFO] [stdout] --> src/main.rs:323:51 [INFO] [stdout] | [INFO] [stdout] 323 | ... let key = tst[j][0] ^ possible_word.bytes().nth(j-start).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `possible_word.as_bytes()[j-start]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] = note: `#[warn(clippy::bytes_nth)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `tst` [INFO] [stdout] --> src/main.rs:325:38 [INFO] [stdout] | [INFO] [stdout] 325 | ... for k in 1..tst[j].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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 325 - for k in 1..tst[j].len() { [INFO] [stdout] 325 + for in tst.iter().take(tst[j].len()).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:45 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'Z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:65 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:88 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:327:108 [INFO] [stdout] | [INFO] [stdout] 327 | ... if !(buf <= 'Z' as u8 && buf >= 'A' as u8) && !(buf <= 'z' as u8 && buf >= 'a' as u8) { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.bytes().nth().unwrap()` on a `String` [INFO] [stdout] --> src/main.rs:342:55 [INFO] [stdout] | [INFO] [stdout] 342 | ... let key = tst[j][0] ^ possible_word.bytes().nth(j-start).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `possible_word.as_bytes()[j-start]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:356:5 [INFO] [stdout] | [INFO] [stdout] 356 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `plaintext` [INFO] [stdout] --> src/main.rs:366:14 [INFO] [stdout] | [INFO] [stdout] 366 | for i in 0..plaintext.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 366 - for i in 0..plaintext.len() { [INFO] [stdout] 366 + for (i, ) in plaintext.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:369:13 [INFO] [stdout] | [INFO] [stdout] 369 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:373:5 [INFO] [stdout] | [INFO] [stdout] 373 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.25s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.7.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "51f4846a9fba0772d110425efebb6b30068717c3c6bab04b0e52c384fec023cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "51f4846a9fba0772d110425efebb6b30068717c3c6bab04b0e52c384fec023cf", kill_on_drop: false }` [INFO] [stdout] 51f4846a9fba0772d110425efebb6b30068717c3c6bab04b0e52c384fec023cf