[INFO] fetching crate ethox 0.0.2... [INFO] linting ethox-0.0.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate ethox 0.0.2 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate ethox 0.0.2 [INFO] removed 0 missing examples [INFO] finished tweaking crates.io crate ethox 0.0.2 [INFO] tweaked toml for crates.io crate ethox 0.0.2 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate ethox 0.0.2 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 crates.io crate ethox 0.0.2 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] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded structopt-derive v0.2.18 [INFO] [stderr] Downloaded unicode-width v0.1.7 [INFO] [stderr] Downloaded structopt v0.2.18 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 77905811ea9f747ad8ec55d55f664d276a1ac1e8e58cb2ce2a9ea95297f6fb5c [INFO] running `Command { std: "docker" "start" "-a" "77905811ea9f747ad8ec55d55f664d276a1ac1e8e58cb2ce2a9ea95297f6fb5c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "77905811ea9f747ad8ec55d55f664d276a1ac1e8e58cb2ce2a9ea95297f6fb5c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "77905811ea9f747ad8ec55d55f664d276a1ac1e8e58cb2ce2a9ea95297f6fb5c", kill_on_drop: false }` [INFO] [stdout] 77905811ea9f747ad8ec55d55f664d276a1ac1e8e58cb2ce2a9ea95297f6fb5c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 9b00c4e2a8ac693dc53f0e0cda4984ba1aee14eeecb44a17f7e093ba99b7308c [INFO] running `Command { std: "docker" "start" "-a" "9b00c4e2a8ac693dc53f0e0cda4984ba1aee14eeecb44a17f7e093ba99b7308c", kill_on_drop: false }` [INFO] [stderr] Checking unicode-width v0.1.7 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Compiling structopt-derive v0.2.18 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking clap v2.33.0 [INFO] [stderr] Checking ethox v0.0.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/layer/tcp/connection.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / /// emitted in the transmission part. [INFO] [stdout] 7 | | [INFO] [stdout] | |_^ [INFO] [stdout] 8 | use core::convert::TryFrom; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Defines the state machine for a single connection. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! A `Connection` is a Mealy machine receiving `InPacket` from the network, returning `Signals` to [INFO] [stdout] 4 ~ //! the rest of the TCP layer. In the other direction, the transmit portion of the stack [INFO] [stdout] 5 ~ //! communicates the user buffers `AvailableBytes` and `ReceivedSegment` to affect the `Segment` [INFO] [stdout] 6 ~ //! emitted in the transmission part. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `log` [INFO] [stdout] --> src/macros.rs:154:11 [INFO] [stdout] | [INFO] [stdout] 154 | #[cfg(all(feature = "log", DISABLED))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `alloc`, `default`, `libc`, `std`, and `sys` [INFO] [stdout] = help: consider adding `log` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `DISABLED` [INFO] [stdout] --> src/macros.rs:154:28 [INFO] [stdout] | [INFO] [stdout] 154 | #[cfg(all(feature = "log", DISABLED))] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(DISABLED)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(DISABLED)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `log` [INFO] [stdout] --> src/macros.rs:163:15 [INFO] [stdout] | [INFO] [stdout] 163 | #[cfg(not(all(feature = "log", DISABLED)))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `alloc`, `default`, `libc`, `std`, and `sys` [INFO] [stdout] = help: consider adding `log` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `DISABLED` [INFO] [stdout] --> src/macros.rs:163:32 [INFO] [stdout] | [INFO] [stdout] 163 | #[cfg(not(all(feature = "log", DISABLED)))] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(DISABLED)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(DISABLED)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/storage/assembler.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | assembler: assembler, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assembler` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `proto-dhcpv4` [INFO] [stdout] --> src/wire/mod.rs:353:7 [INFO] [stdout] | [INFO] [stdout] 353 | #[cfg(feature = "proto-dhcpv4")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `alloc`, `default`, `libc`, `std`, and `sys` [INFO] [stdout] = help: consider adding `proto-dhcpv4` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/pretty_print.rs:46:24 [INFO] [stdout] | [INFO] [stdout] 46 | PrettyIndent { prefix: prefix, level: 0 } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `prefix` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/pretty_print.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | prefix: prefix, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `prefix` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:445:20 [INFO] [stdout] | [INFO] [stdout] 445 | Endpoint { addr: addr, port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:445:32 [INFO] [stdout] | [INFO] [stdout] 445 | Endpoint { addr: addr, port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:492:48 [INFO] [stdout] | [INFO] [stdout] 492 | Endpoint { addr: Address::Unspecified, port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:498:39 [INFO] [stdout] | [INFO] [stdout] 498 | Endpoint { addr: addr.into(), port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:693:21 [INFO] [stdout] | [INFO] [stdout] 693 | src_addr: src_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `src_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:694:21 [INFO] [stdout] | [INFO] [stdout] 694 | dst_addr: dst_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dst_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:695:21 [INFO] [stdout] | [INFO] [stdout] 695 | protocol: protocol, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `protocol` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:696:21 [INFO] [stdout] | [INFO] [stdout] 696 | payload_len: payload_len, hop_limit [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `payload_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:706:21 [INFO] [stdout] | [INFO] [stdout] 706 | src_addr: src_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `src_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:707:21 [INFO] [stdout] | [INFO] [stdout] 707 | dst_addr: dst_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dst_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:709:21 [INFO] [stdout] | [INFO] [stdout] 709 | payload_len: payload_len, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `payload_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:710:21 [INFO] [stdout] | [INFO] [stdout] 710 | hop_limit: hop_limit [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `hop_limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./ipv4.rs:622:17 [INFO] [stdout] | [INFO] [stdout] 622 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ipv4.rs:915:13 [INFO] [stdout] | [INFO] [stdout] 915 | payload_len: payload_len, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `payload_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./icmpv4.rs:298:17 [INFO] [stdout] | [INFO] [stdout] 298 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./udp.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./tcp.rs:286:17 [INFO] [stdout] | [INFO] [stdout] 286 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:705:55 [INFO] [stdout] | [INFO] [stdout] 705 | option = TcpOption::Unknown { kind: kind, data: data } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:705:67 [INFO] [stdout] | [INFO] [stdout] 705 | option = TcpOption::Unknown { kind: kind, data: data } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:919:13 [INFO] [stdout] | [INFO] [stdout] 919 | flags: flags, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `flags` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:921:13 [INFO] [stdout] | [INFO] [stdout] 921 | ack_number: ack_number, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ack_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:923:13 [INFO] [stdout] | [INFO] [stdout] 923 | window_scale: window_scale, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:924:13 [INFO] [stdout] | [INFO] [stdout] 924 | max_seg_size: max_seg_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_seg_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:925:13 [INFO] [stdout] | [INFO] [stdout] 925 | sack_permitted: sack_permitted, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sack_permitted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:926:13 [INFO] [stdout] | [INFO] [stdout] 926 | sack_ranges: sack_ranges, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sack_ranges` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/wire/./tcp.rs:1013:13 [INFO] [stdout] | [INFO] [stdout] 1013 | (self.flags.syn() | self.flags.fin() | self.flags.rst()) [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] 1013 - (self.flags.syn() | self.flags.fin() | self.flags.rst()) [INFO] [stdout] 1013 + self.flags.syn() | self.flags.fin() | self.flags.rst() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./ethernet.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / enum_with_unknown! { [INFO] [stdout] 9 | | /// Ethernet protocol type. [INFO] [stdout] 10 | | pub enum EtherType(u16) { [INFO] [stdout] 11 | | Ipv4 = 0x0800, [INFO] [stdout] ... | [INFO] [stdout] 16 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(invalid_doc_attributes)]` on by default [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./arp.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / enum_with_unknown! { [INFO] [stdout] 12 | | /// ARP hardware type. [INFO] [stdout] 13 | | pub enum Hardware(u16) { [INFO] [stdout] 14 | | Ethernet = 1 [INFO] [stdout] 15 | | } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./arp.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / enum_with_unknown! { [INFO] [stdout] 19 | | /// ARP operation type. [INFO] [stdout] 20 | | pub enum Operation(u16) { [INFO] [stdout] 21 | | Request = 1, [INFO] [stdout] ... | [INFO] [stdout] 24 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./ip.rs:57:1 [INFO] [stdout] | [INFO] [stdout] 57 | / enum_with_unknown! { [INFO] [stdout] 58 | | /// IP datagram encapsulated protocol. [INFO] [stdout] 59 | | pub enum Protocol(u8) { [INFO] [stdout] 60 | | HopByHop = 0x00, [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./ipv6.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / enum_with_unknown! { [INFO] [stdout] 32 | | /// IPv6 multicast scope. [INFO] [stdout] 33 | | pub enum Scope(u8) { [INFO] [stdout] 34 | | /// The address is valid for the interface alone. [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking structopt v0.2.18 [INFO] [stdout] warning: field `silent_until` is never read [INFO] [stdout] --> src/layer/arp/neighbor.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 107 | pub struct Cache<'a> { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 108 | storage: Ordered<'a, Neighbor>, [INFO] [stdout] 109 | silent_until: Instant, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Cache` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/nic/common.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | FlagState::SetTrue(b) => Ok(*b = true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 70 ~ FlagState::SetTrue(b) => { [INFO] [stdout] 71 + let _: () = *b = true; [INFO] [stdout] 72 + Ok(()) [INFO] [stdout] 73 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | //! need to lend their state to a specific packet. Instead, each method offered by its packet [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 102 | //! need to lend their state to a specific packet. Instead, each method offered by its packet [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | //! representation mutates some aspects in a local context. The same would also be possible with a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 103 | //! representation mutates some aspects in a local context. The same would also be possible with a [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | //! shared reference to a `RefCell<_>` of the internal state by calling [`RefCell::borrow_mut`]. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 104 | //! shared reference to a `RefCell<_>` of the internal state by calling [`RefCell::borrow_mut`]. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | //! the packet given to the upper layer. Such a layer is not re-entrant. If the upper layer is a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 106 | //! the packet given to the upper layer. Such a layer is not re-entrant. If the upper layer is a [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | //! tunnel of sorts that unpacks an encapsulated lower layer packet then the reentry will fail to [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 107 | //! tunnel of sorts that unpacks an encapsulated lower layer packet then the reentry will fail to [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:108:5 [INFO] [stdout] | [INFO] [stdout] 108 | //! again borrow from the `RefCell`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 108 | //! again borrow from the `RefCell`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | //! independently. The splitting function can be based on ip subnet or on a hash for example. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 112 | //! independently. The splitting function can be based on ip subnet or on a hash for example. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/layer/arp/endpoint.rs:193:16 [INFO] [stdout] | [INFO] [stdout] 193 | if let Some(_) = self.inner.neighbors.lookup(prot_addr, time) { [INFO] [stdout] | -------^^^^^^^----------------------------------------------- help: try: `if self.inner.neighbors.lookup(prot_addr, time).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/layer/arp/endpoint.rs:217:16 [INFO] [stdout] | [INFO] [stdout] 217 | if let Err(_) = self.endpoint.handle_internally(packet) { [INFO] [stdout] | -------^^^^^^------------------------------------------ help: try: `if self.endpoint.handle_internally(packet).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/layer/arp/endpoint.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | if let Err(_) = self.endpoint.send_oustanding(packet) { [INFO] [stdout] | -------^^^^^^---------------------------------------- help: try: `if self.endpoint.send_oustanding(packet).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/layer/arp/neighbor.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | / impl Default for Mapping { [INFO] [stdout] 55 | | fn default() -> Self { [INFO] [stdout] 56 | | Mapping::LookingFor [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 43 + #[derive(Default)] [INFO] [stdout] 44 | pub enum Mapping { [INFO] [stdout] 45 | /// An address is present. [INFO] [stdout] ... [INFO] [stdout] 48 | /// We don't have a mapping but want to have one. [INFO] [stdout] 49 ~ #[default] [INFO] [stdout] 50 ~ LookingFor, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/layer/arp/neighbor.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | / self.inner.by_ref() [INFO] [stdout] 374 | | .filter(|entry| entry.hardware_addr().is_none()) [INFO] [stdout] 375 | | .next() [INFO] [stdout] | |___________________^ help: try: `self.inner.by_ref().find(|entry| entry.hardware_addr().is_none())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/layer/ip/endpoint.rs:203:26 [INFO] [stdout] | [INFO] [stdout] 203 | fn into_arp_receiver(&mut self) -> layer::arp::Receiver<'_, 'data> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/layer/ip/endpoint.rs:208:24 [INFO] [stdout] | [INFO] [stdout] 208 | fn into_arp_sender(&mut self) -> layer::arp::Sender<'_, 'data> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/layer/ip/packet.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | / match &mut self.packet { [INFO] [stdout] 242 | | IpPacket::V4(ipv4) => { [INFO] [stdout] 243 | | // Recalculate the checksum if necessary. [INFO] [stdout] 244 | | ipv4.fill_checksum(capabilities.ipv4().tx_checksum()); [INFO] [stdout] 245 | | }, [INFO] [stdout] 246 | | _ => (), [INFO] [stdout] 247 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 241 ~ if let IpPacket::V4(ipv4) = &mut self.packet { [INFO] [stdout] 242 + // Recalculate the checksum if necessary. [INFO] [stdout] 243 + ipv4.fill_checksum(capabilities.ipv4().tx_checksum()); [INFO] [stdout] 244 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/ip/packet.rs:309:24 [INFO] [stdout] | [INFO] [stdout] 309 | hop_limit: u8::max_value(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 309 - hop_limit: u8::max_value(), [INFO] [stdout] 309 + hop_limit: u8::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `wire::raw::ip::Address` [INFO] [stdout] --> src/layer/ip/route.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | next_hop: Address::v4(0, 0, 0, 0).into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Address::v4(0, 0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `wire::raw::ip::Address` [INFO] [stdout] --> src/layer/ip/route.rs:54:23 [INFO] [stdout] | [INFO] [stdout] 54 | next_hop: Address::v6(0, 0, 0, 0, 0, 0, 0, 0).into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Address::v6(0, 0, 0, 0, 0, 0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/layer/ip/route.rs:140:28 [INFO] [stdout] | [INFO] [stdout] 140 | Some(place) => Ok(*place = route), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 140 ~ Some(place) => { [INFO] [stdout] 141 + let _: () = *place = route; [INFO] [stdout] 142 + Ok(()) [INFO] [stdout] 143 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/loss/mod.rs:92:28 [INFO] [stdout] | [INFO] [stdout] 92 | lossrate: Some(u32::max_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 92 - lossrate: Some(u32::max_value()), [INFO] [stdout] 92 + lossrate: Some(u32::MAX), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/layer/loss/mod.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / pub fn next(&mut self) -> u64 { [INFO] [stdout] 128 | | let s = &mut self.state; [INFO] [stdout] 129 | | let result_starstar = s[1] [INFO] [stdout] 130 | | .wrapping_mul(5) [INFO] [stdout] ... | [INFO] [stdout] 145 | | result_starstar [INFO] [stdout] 146 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` 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: doc quote line without `>` marker [INFO] [stdout] --> src/layer/tcp/mod.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | //! of TCP Reno, Raid Y. Zaghal and Javed I. Khan, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this not intended to be a quote at all, escape it with `\>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: add markers to start of line [INFO] [stdout] | [INFO] [stdout] 74 | //! > of TCP Reno, Raid Y. Zaghal and Javed I. Khan, [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc quote line without `>` marker [INFO] [stdout] --> src/layer/tcp/mod.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | //! incoming segment except another reset. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this not intended to be a quote at all, escape it with `\>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: add markers to start of line [INFO] [stdout] | [INFO] [stdout] 91 | //! > incoming segment except another reset. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:519:9 [INFO] [stdout] | [INFO] [stdout] 519 | return signals; [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] 519 - return signals; [INFO] [stdout] 519 + signals [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:660:9 [INFO] [stdout] | [INFO] [stdout] 660 | return Signals::default(); [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] 660 - return Signals::default(); [INFO] [stdout] 660 + Signals::default() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:603:17 [INFO] [stdout] | [INFO] [stdout] 603 | / signals.answer = Some(InnerRepr { [INFO] [stdout] 604 | | flags: tcp::Flags::RST, [INFO] [stdout] 605 | | seq_number: ack, [INFO] [stdout] 606 | | ack_number: Some(segment.seq_number), [INFO] [stdout] ... | [INFO] [stdout] 612 | | payload_len: 0, [INFO] [stdout] 613 | | }.send_back(segment)); [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { answer: Some(InnerRepr { [INFO] [stdout] flags: tcp::Flags::RST, [INFO] [stdout] seq_number: ack, [INFO] [stdout] ack_number: Some(segment.seq_number), [INFO] [stdout] window_len: 0, [INFO] [stdout] window_scale: None, [INFO] [stdout] max_seg_size: None, [INFO] [stdout] sack_permitted: false, [INFO] [stdout] sack_ranges: [None; 3], [INFO] [stdout] payload_len: 0, [INFO] [stdout] }.send_back(segment)), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:602:17 [INFO] [stdout] | [INFO] [stdout] 602 | let mut signals = Signals::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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:652:13 [INFO] [stdout] | [INFO] [stdout] 652 | signals.answer = Some(self.send_open(true, entry.four_tuple())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { answer: Some(self.send_open(true, entry.four_tuple())), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:651:13 [INFO] [stdout] | [INFO] [stdout] 651 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:740:9 [INFO] [stdout] | [INFO] [stdout] 740 | signals.receive = Some(segment_ack); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { receive: Some(segment_ack), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:739:9 [INFO] [stdout] | [INFO] [stdout] 739 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:766:9 [INFO] [stdout] | [INFO] [stdout] 766 | return signals; [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] 766 - return signals; [INFO] [stdout] 766 + signals [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:764:9 [INFO] [stdout] | [INFO] [stdout] 764 | signals.reset = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { reset: true, delete: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:763:9 [INFO] [stdout] | [INFO] [stdout] 763 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:776:9 [INFO] [stdout] | [INFO] [stdout] 776 | signals.reset = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { reset: true, delete: true, answer: Some(InnerRepr { [INFO] [stdout] flags: tcp::Flags::RST, [INFO] [stdout] seq_number: self.send.next, [INFO] [stdout] ack_number: Some(self.ack_all()), [INFO] [stdout] window_len: 0, [INFO] [stdout] window_scale: None, [INFO] [stdout] max_seg_size: None, [INFO] [stdout] sack_permitted: false, [INFO] [stdout] sack_ranges: [None; 3], [INFO] [stdout] payload_len: 0, [INFO] [stdout] }.send_to(entry.four_tuple())), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:775:9 [INFO] [stdout] | [INFO] [stdout] 775 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:796:9 [INFO] [stdout] | [INFO] [stdout] 796 | return signals; [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] 796 - return signals; [INFO] [stdout] 796 + signals [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:795:9 [INFO] [stdout] | [INFO] [stdout] 795 | signals.answer = Some(self.repr_ack_all(remote)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { answer: Some(self.repr_ack_all(remote)), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:794:9 [INFO] [stdout] | [INFO] [stdout] 794 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layer/tcp/connection.rs:917:21 [INFO] [stdout] | [INFO] [stdout] 917 | assert!(range.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!range.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/layer/tcp/connection.rs:919:43 [INFO] [stdout] | [INFO] [stdout] 919 | let is_fin = available.fin && end as usize == available.total; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `end` [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: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/connection.rs:1160:29 [INFO] [stdout] | [INFO] [stdout] 1160 | let max = u32::from(u16::max_value()) << self.window_scale; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 1160 - let max = u32::from(u16::max_value()) << self.window_scale; [INFO] [stdout] 1160 + let max = u32::from(u16::MAX) << self.window_scale; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/layer/tcp/connection.rs:1161:22 [INFO] [stdout] | [INFO] [stdout] 1161 | let capped = u32::try_from(window) [INFO] [stdout] | ______________________^ [INFO] [stdout] 1162 | | .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] | |_________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1162 - .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] 1162 + .unwrap_or(u32::max_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/connection.rs:1162:33 [INFO] [stdout] | [INFO] [stdout] 1162 | .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 1162 - .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] 1162 + .unwrap_or_else(|_| u32::MAX) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/layer/tcp/connection.rs:1287:19 [INFO] [stdout] | [INFO] [stdout] 1287 | let key = match endpoint.find_tuple(tuple) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 1288 | | Some(entry) => Some(entry.slot_key()), [INFO] [stdout] 1289 | | None => None, [INFO] [stdout] 1290 | | }; [INFO] [stdout] | |_________^ help: try: `endpoint.find_tuple(tuple).map(|entry| entry.slot_key())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/layer/tcp/connection.rs:1334:1 [INFO] [stdout] | [INFO] [stdout] 1334 | / impl Default for State { [INFO] [stdout] 1335 | | fn default() -> Self { [INFO] [stdout] 1336 | | State::Closed [INFO] [stdout] 1337 | | } [INFO] [stdout] 1338 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 189 + #[derive(Default)] [INFO] [stdout] 190 | pub enum State { [INFO] [stdout] 191 | /// Marker state fo an unintended/uninitialized connection state. [INFO] [stdout] 192 ~ #[default] [INFO] [stdout] 193 ~ Closed, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/endpoint.rs:277:27 [INFO] [stdout] | [INFO] [stdout] 277 | ssthresh: u32::max_value(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 277 - ssthresh: u32::max_value(), [INFO] [stdout] 277 + ssthresh: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layer/tcp/endpoint.rs:507:30 [INFO] [stdout] | [INFO] [stdout] 507 | Err(_) => return (), [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layer/tcp/endpoint.rs:514:30 [INFO] [stdout] | [INFO] [stdout] 514 | Err(_) => return (), [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/io.rs:359:9 [INFO] [stdout] | [INFO] [stdout] 359 | usize::max_value() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 359 - usize::max_value() [INFO] [stdout] 359 + usize::MAX [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `debug_assert_eq!` with a literal bool [INFO] [stdout] --> src/layer/tcp/packet.rs:298:9 [INFO] [stdout] | [INFO] [stdout] 298 | debug_assert_eq!(signals.reset, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `debug_assert!(..)` [INFO] [stdout] | [INFO] [stdout] 298 - debug_assert_eq!(signals.reset, false); [INFO] [stdout] 298 + debug_assert!(!signals.reset); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Repr` which implements the `Copy` trait [INFO] [stdout] --> src/layer/tcp/packet.rs:568:62 [INFO] [stdout] | [INFO] [stdout] 568 | let raw_packet = tcp::Packet::new_unchecked(&mut packet, answer.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `answer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Repr` which implements the `Copy` trait [INFO] [stdout] --> src/layer/tcp/packet.rs:570:66 [INFO] [stdout] | [INFO] [stdout] 570 | let mut raw_packet = tcp::Packet::new_unchecked(&mut packet, answer.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `answer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/layer/tcp/socket.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / match self.state { [INFO] [stdout] 101 | | ClientState::Finished => true, [INFO] [stdout] 102 | | _ => false, [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 100 - match self.state { [INFO] [stdout] 101 - ClientState::Finished => true, [INFO] [stdout] 102 - _ => false, [INFO] [stdout] 103 - } [INFO] [stdout] 100 + matches!(self.state, ClientState::Finished) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/managed/ordered.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if !(prev <= &new) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(prev > &new)` [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/managed/ordered.rs:96:16 [INFO] [stdout] | [INFO] [stdout] 96 | if !(&new <= next) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(&new > next)` [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: usage of a legacy numeric method [INFO] [stdout] --> src/managed/ordered.rs:86:33 [INFO] [stdout] | [INFO] [stdout] 86 | assert!(mutable.len() < usize::max_value()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 86 - assert!(mutable.len() < usize::max_value()); [INFO] [stdout] 86 + assert!(mutable.len() < usize::MAX); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/managed/slotmap.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if self.get(index).is_none() { [INFO] [stdout] 184 | | return None [INFO] [stdout] 185 | | } [INFO] [stdout] | |_________^ help: replace it with: `self.get(index)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/managed/slotmap.rs:275:28 [INFO] [stdout] | [INFO] [stdout] 275 | assert!(capacity < isize::max_value() as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 275 - assert!(capacity < isize::max_value() as usize); [INFO] [stdout] 275 + assert!(capacity < isize::MAX as usize); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/managed/slotmap.rs:339:26 [INFO] [stdout] | [INFO] [stdout] 339 | assert!(offset < isize::max_value() as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 339 - assert!(offset < isize::max_value() as usize); [INFO] [stdout] 339 + assert!(offset < isize::MAX as usize); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/storage/assembler.rs:195:5 [INFO] [stdout] | [INFO] [stdout] 195 | pub fn add(&mut self, start: u32, size: u32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/storage/assembler.rs:196:36 [INFO] [stdout] | [INFO] [stdout] 196 | self.add_impl(start, size, u32::max_value()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 196 - self.add_impl(start, size, u32::max_value()) [INFO] [stdout] 196 + self.add_impl(start, size, u32::MAX) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/storage/assembler.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | pub fn bounded_add(&mut self, start: u32, size: u32, max: u32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/storage/assembler.rs:425:13 [INFO] [stdout] | [INFO] [stdout] 425 | self.left = self.left + contig.hole_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.left += contig.hole_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/storage/ring_buffer.rs:120:16 [INFO] [stdout] | [INFO] [stdout] 120 | if let Ok(_) = &result { [INFO] [stdout] | -------^^^^^---------- help: try: `if result.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/storage/ring_buffer.rs:131:24 [INFO] [stdout] | [INFO] [stdout] 131 | pub fn enqueue_one<'b>(&'b mut self) -> Option<&'b mut T> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 131 - pub fn enqueue_one<'b>(&'b mut self) -> Option<&'b mut T> { [INFO] [stdout] 131 + pub fn enqueue_one(&mut self) -> Option<&mut T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/storage/ring_buffer.rs:145:16 [INFO] [stdout] | [INFO] [stdout] 145 | if let Ok(_) = &result { [INFO] [stdout] | -------^^^^^---------- help: try: `if result.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/storage/ring_buffer.rs:194:25 [INFO] [stdout] | [INFO] [stdout] 194 | pub fn enqueue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 194 - pub fn enqueue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] 194 + pub fn enqueue_many(&mut self, size: usize) -> &mut [T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/storage/ring_buffer.rs:246:25 [INFO] [stdout] | [INFO] [stdout] 246 | pub fn dequeue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 246 - pub fn dequeue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] 246 + pub fn dequeue_many(&mut self, size: usize) -> &mut [T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i64::abs()` to u64 [INFO] [stdout] --> src/time.rs:171:31 [INFO] [stdout] | [INFO] [stdout] 171 | Duration::from_millis((self.millis - rhs.millis).abs() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.millis - rhs.millis).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/time.rs:175:1 [INFO] [stdout] | [INFO] [stdout] 175 | / impl Default for Expiration { [INFO] [stdout] 176 | | fn default() -> Self { [INFO] [stdout] 177 | | Expiration::Never [INFO] [stdout] 178 | | } [INFO] [stdout] 179 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 35 + #[derive(Default)] [INFO] [stdout] 36 | pub enum Expiration { [INFO] [stdout] 37 | /// Some finite point in time. [INFO] [stdout] ... [INFO] [stdout] 42 | /// This variant always compares greater or equal to all other possible values of `Expiration`. [INFO] [stdout] 43 ~ #[default] [INFO] [stdout] 44 ~ Never, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/time.rs:199:1 [INFO] [stdout] | [INFO] [stdout] 199 | / impl cmp::PartialOrd for Expiration { [INFO] [stdout] 200 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 | | match (*self, *other) { [INFO] [stdout] 202 | | (Never, Never) => Some(cmp::Ordering::Equal), [INFO] [stdout] ... | [INFO] [stdout] 208 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 200 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 - match (*self, *other) { [INFO] [stdout] 202 - (Never, Never) => Some(cmp::Ordering::Equal), [INFO] [stdout] 203 - (Never, When(_)) => Some(cmp::Ordering::Greater), [INFO] [stdout] 204 - (When(_), Never) => Some(cmp::Ordering::Less), [INFO] [stdout] 205 - (When(ref a), When(ref b)) => a.partial_cmp(b), [INFO] [stdout] 206 - } [INFO] [stdout] 207 - } [INFO] [stdout] 200 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/wire/pretty_print.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | 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] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 51 - write!(f, "\n")?; [INFO] [stdout] 51 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/pretty_print.rs:115:25 [INFO] [stdout] | [INFO] [stdout] 115 | T::pretty_print(&self.buffer, f, &mut PrettyIndent::new(self.prefix)) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `self.buffer` [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: non-canonical implementation of `clone` on a `Copy` type [INFO] [stdout] --> src/wire/pretty_print.rs:120:29 [INFO] [stdout] | [INFO] [stdout] 120 | fn clone(&self) -> Self { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 121 | | Formatter { ..*self } [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____^ help: change this to: `{ *self }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_clone_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> src/wire/pretty_print.rs:129:29 [INFO] [stdout] | [INFO] [stdout] 129 | Formatter { _inner: PhantomData::default() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 129 - Formatter { _inner: PhantomData::default() } [INFO] [stdout] 129 + Formatter { _inner: PhantomData } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/wire/./ethernet.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | if let Some(_) = components.next() { [INFO] [stdout] | -------^^^^^^^-------------------- help: try: `if components.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/./ethernet.rs:374:43 [INFO] [stdout] | [INFO] [stdout] 374 | arp::packet::pretty_print(&frame.payload(), f, indent) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `frame.payload()` [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/wire/./ethernet.rs:378:46 [INFO] [stdout] | [INFO] [stdout] 378 | ip::v4::packet::pretty_print(&frame.payload(), f, indent) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `frame.payload()` [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/wire/./ethernet.rs:382:46 [INFO] [stdout] | [INFO] [stdout] 382 | ip::v6::packet::pretty_print(&frame.payload(), f, indent) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `frame.payload()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/wire/./arp.rs:116:34 [INFO] [stdout] | [INFO] [stdout] 116 | if len < field::OPER.end { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 117 | | Err(Error::Truncated) [INFO] [stdout] 118 | | } else if len < field::TPA(self.hardware_len(), self.protocol_len()).end { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/wire/./arp.rs:118:82 [INFO] [stdout] | [INFO] [stdout] 118 | } else if len < field::TPA(self.hardware_len(), self.protocol_len()).end { [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 119 | | Err(Error::Truncated) [INFO] [stdout] 120 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./arp.rs:363:9 [INFO] [stdout] | [INFO] [stdout] 363 | / match self { [INFO] [stdout] 364 | | &Repr::EthernetIpv4 { .. } => field::TPA(6, 4).end, [INFO] [stdout] 365 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 366 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 363 ~ match *self { [INFO] [stdout] 364 ~ Repr::EthernetIpv4 { .. } => field::TPA(6, 4).end, [INFO] [stdout] 365 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./arp.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | / match self { [INFO] [stdout] 372 | | &Repr::EthernetIpv4 { [INFO] [stdout] 373 | | operation, [INFO] [stdout] 374 | | source_hardware_addr, [INFO] [stdout] ... | [INFO] [stdout] 389 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 390 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 371 ~ match *self { [INFO] [stdout] 372 ~ Repr::EthernetIpv4 { [INFO] [stdout] 373 + operation, [INFO] [stdout] 374 + source_hardware_addr, [INFO] [stdout] 375 + source_protocol_addr, [INFO] [stdout] 376 + target_hardware_addr, [INFO] [stdout] 377 + target_protocol_addr, [INFO] [stdout] 378 ~ } => { [INFO] [stdout] 379 | packet.set_hardware_type(Hardware::Ethernet); [INFO] [stdout] ... [INFO] [stdout] 388 | }, [INFO] [stdout] 389 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./arp.rs:425:9 [INFO] [stdout] | [INFO] [stdout] 425 | / match self { [INFO] [stdout] 426 | | &Repr::EthernetIpv4 { [INFO] [stdout] 427 | | operation, [INFO] [stdout] 428 | | source_hardware_addr, [INFO] [stdout] ... | [INFO] [stdout] 441 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 442 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 425 ~ match *self { [INFO] [stdout] 426 ~ Repr::EthernetIpv4 { [INFO] [stdout] 427 + operation, [INFO] [stdout] 428 + source_hardware_addr, [INFO] [stdout] 429 + source_protocol_addr, [INFO] [stdout] 430 + target_hardware_addr, [INFO] [stdout] 431 + target_protocol_addr, [INFO] [stdout] 432 ~ } => write!( [INFO] [stdout] 433 | f, [INFO] [stdout] ... [INFO] [stdout] 440 | ), [INFO] [stdout] 441 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ip.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / match self { [INFO] [stdout] 49 | | &Version::Unspecified => write!(f, "IPv?"), [INFO] [stdout] 50 | | &Version::Ipv4 => write!(f, "IPv4"), [INFO] [stdout] 51 | | &Version::Ipv6 => write!(f, "IPv6"), [INFO] [stdout] 52 | | &Version::__Nonexhaustive => unreachable!() [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 48 ~ match *self { [INFO] [stdout] 49 ~ Version::Unspecified => write!(f, "IPv?"), [INFO] [stdout] 50 ~ Version::Ipv4 => write!(f, "IPv4"), [INFO] [stdout] 51 ~ Version::Ipv6 => write!(f, "IPv6"), [INFO] [stdout] 52 ~ Version::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/wire/./ip.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | / pub fn v6( [INFO] [stdout] 117 | | a0: u16, a1: u16, a2: u16, a3: u16, [INFO] [stdout] 118 | | a4: u16, a5: u16, a6: u16, a7: u16, [INFO] [stdout] 119 | | ) -> Address { [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/wire/./ip.rs:236:1 [INFO] [stdout] | [INFO] [stdout] 236 | / impl Default for Address { [INFO] [stdout] 237 | | fn default() -> Address { [INFO] [stdout] 238 | | Address::Unspecified [INFO] [stdout] 239 | | } [INFO] [stdout] 240 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 93 + #[derive(Default)] [INFO] [stdout] 94 | pub enum Address { [INFO] [stdout] 95 | /// An unspecified address. [INFO] [stdout] 96 | /// May be used as a placeholder for storage where the address is not assigned yet. [INFO] [stdout] 97 ~ #[default] [INFO] [stdout] 98 ~ Unspecified, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/wire/./ip.rs:879:44 [INFO] [stdout] | [INFO] [stdout] 879 | match udp::packet::new_checked(payload.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `payload` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/wire/./ip.rs:896:53 [INFO] [stdout] | [INFO] [stdout] 896 | match tcp::Packet::<&[u8]>::new_checked(payload.as_ref(), tcp::Checksum::Ignored) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `payload` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/wire/./ipv4.rs:522:38 [INFO] [stdout] | [INFO] [stdout] 522 | if len < field::DST_ADDR.end { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 523 | | Err(Error::Truncated) [INFO] [stdout] 524 | | } else if len < self.header_len() as usize { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/wire/./ipv4.rs:524:52 [INFO] [stdout] | [INFO] [stdout] 524 | } else if len < self.header_len() as usize { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 525 | | Err(Error::Truncated) [INFO] [stdout] 526 | | } else if self.header_len() as u16 > self.total_len() { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/layer/tcp/connection.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / /// emitted in the transmission part. [INFO] [stdout] 7 | | [INFO] [stdout] | |_^ [INFO] [stdout] 8 | use core::convert::TryFrom; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Defines the state machine for a single connection. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! A `Connection` is a Mealy machine receiving `InPacket` from the network, returning `Signals` to [INFO] [stdout] 4 ~ //! the rest of the TCP layer. In the other direction, the transmit portion of the stack [INFO] [stdout] 5 ~ //! communicates the user buffers `AvailableBytes` and `ReceivedSegment` to affect the `Segment` [INFO] [stdout] 6 ~ //! emitted in the transmission part. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/wire/./ipv6.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 79 | / pub fn new( [INFO] [stdout] 80 | | a0: u16, a1: u16, a2: u16, a3: u16, [INFO] [stdout] 81 | | a4: u16, a5: u16, a6: u16, a7: u16, [INFO] [stdout] 82 | | ) -> Address { [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is used to index `data` [INFO] [stdout] --> src/wire/./ipv6.rs:112:25 [INFO] [stdout] | [INFO] [stdout] 112 | for word_idx in 0..8 { [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] 112 - for word_idx in 0..8 { [INFO] [stdout] 112 + for (word_idx, ) in data.iter().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/wire/./ipv6.rs:173:18 [INFO] [stdout] | [INFO] [stdout] 173 | for i in 0..8 { [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] 173 - for i in 0..8 { [INFO] [stdout] 173 + for (i, ) in data.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `log` [INFO] [stdout] --> src/macros.rs:154:11 [INFO] [stdout] | [INFO] [stdout] 154 | #[cfg(all(feature = "log", DISABLED))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `alloc`, `default`, `libc`, `std`, and `sys` [INFO] [stdout] = help: consider adding `log` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `DISABLED` [INFO] [stdout] --> src/macros.rs:154:28 [INFO] [stdout] | [INFO] [stdout] 154 | #[cfg(all(feature = "log", DISABLED))] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(DISABLED)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(DISABLED)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `log` [INFO] [stdout] --> src/macros.rs:163:15 [INFO] [stdout] | [INFO] [stdout] 163 | #[cfg(not(all(feature = "log", DISABLED)))] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `alloc`, `default`, `libc`, `std`, and `sys` [INFO] [stdout] = help: consider adding `log` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `DISABLED` [INFO] [stdout] --> src/macros.rs:163:32 [INFO] [stdout] | [INFO] [stdout] 163 | #[cfg(not(all(feature = "log", DISABLED)))] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(DISABLED)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(DISABLED)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/storage/assembler.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | assembler: assembler, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assembler` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / match self { [INFO] [stdout] 17 | | &Type::Pad1 => write!(f, "Pad1"), [INFO] [stdout] 18 | | &Type::PadN => write!(f, "PadN"), [INFO] [stdout] 19 | | &Type::Unknown(id) => write!(f, "{}", id) [INFO] [stdout] 20 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 16 ~ match *self { [INFO] [stdout] 17 ~ Type::Pad1 => write!(f, "Pad1"), [INFO] [stdout] 18 ~ Type::PadN => write!(f, "PadN"), [INFO] [stdout] 19 ~ Type::Unknown(id) => write!(f, "{}", id) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6option.rs:190:6 [INFO] [stdout] | [INFO] [stdout] 190 | impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Ipv6Option<&'a mut T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 190 - impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Ipv6Option<&'a mut T> { [INFO] [stdout] 190 + impl + AsMut<[u8]> + ?Sized> Ipv6Option<&mut T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6option.rs:203:6 [INFO] [stdout] | [INFO] [stdout] 203 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Ipv6Option<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 203 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Ipv6Option<&'a T> { [INFO] [stdout] 203 + impl + ?Sized> fmt::Display for Ipv6Option<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `proto-dhcpv4` [INFO] [stdout] --> src/wire/mod.rs:353:7 [INFO] [stdout] | [INFO] [stdout] 353 | #[cfg(feature = "proto-dhcpv4")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `alloc`, `default`, `libc`, `std`, and `sys` [INFO] [stdout] = help: consider adding `proto-dhcpv4` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/pretty_print.rs:46:24 [INFO] [stdout] | [INFO] [stdout] 46 | PrettyIndent { prefix: prefix, level: 0 } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `prefix` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/pretty_print.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | prefix: prefix, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `prefix` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | / match self { [INFO] [stdout] 251 | | &Repr::Pad1 => 1, [INFO] [stdout] 252 | | &Repr::PadN(length) => [INFO] [stdout] 253 | | field::DATA(length).end, [INFO] [stdout] ... | [INFO] [stdout] 257 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 258 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 250 ~ match *self { [INFO] [stdout] 251 ~ Repr::Pad1 => 1, [INFO] [stdout] 252 ~ Repr::PadN(length) => [INFO] [stdout] 253 | field::DATA(length).end, [INFO] [stdout] 254 ~ Repr::Unknown{ length, .. } => [INFO] [stdout] 255 | field::DATA(length).end, [INFO] [stdout] 256 | [INFO] [stdout] 257 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:263:9 [INFO] [stdout] | [INFO] [stdout] 263 | / match self { [INFO] [stdout] 264 | | &Repr::Pad1 => [INFO] [stdout] 265 | | opt.set_option_type(Type::Pad1), [INFO] [stdout] 266 | | &Repr::PadN(len) => { [INFO] [stdout] ... | [INFO] [stdout] 280 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 281 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 263 ~ match *self { [INFO] [stdout] 264 ~ Repr::Pad1 => [INFO] [stdout] 265 | opt.set_option_type(Type::Pad1), [INFO] [stdout] 266 ~ Repr::PadN(len) => { [INFO] [stdout] 267 | opt.set_option_type(Type::PadN); [INFO] [stdout] ... [INFO] [stdout] 273 | } [INFO] [stdout] 274 ~ Repr::Unknown{ type_, length, data } => { [INFO] [stdout] 275 | opt.set_option_type(type_); [INFO] [stdout] ... [INFO] [stdout] 279 | [INFO] [stdout] 280 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:354:9 [INFO] [stdout] | [INFO] [stdout] 354 | / match self { [INFO] [stdout] 355 | | &Repr::Pad1 => [INFO] [stdout] 356 | | write!(f, "{} ", Type::Pad1), [INFO] [stdout] 357 | | &Repr::PadN(len) => [INFO] [stdout] ... | [INFO] [stdout] 362 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 363 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 354 ~ match *self { [INFO] [stdout] 355 ~ Repr::Pad1 => [INFO] [stdout] 356 | write!(f, "{} ", Type::Pad1), [INFO] [stdout] 357 ~ Repr::PadN(len) => [INFO] [stdout] 358 | write!(f, "{} length={} ", Type::PadN, len), [INFO] [stdout] 359 ~ Repr::Unknown{ type_, length, .. } => [INFO] [stdout] 360 | write!(f, "{} length={} ", type_, length), [INFO] [stdout] 361 | [INFO] [stdout] 362 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6hopbyhop.rs:136:6 [INFO] [stdout] | [INFO] [stdout] 136 | impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Header<&'a mut T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 136 - impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Header<&'a mut T> { [INFO] [stdout] 136 + impl + AsMut<[u8]> + ?Sized> Header<&mut T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6hopbyhop.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 146 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] 146 + impl + ?Sized> fmt::Display for Header<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/wire/./ipv6fragment.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | data[3] = data[3] & 0xf9; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data[3] &= 0xf9` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6fragment.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 146 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] 146 + impl + ?Sized> fmt::Display for Header<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:445:20 [INFO] [stdout] | [INFO] [stdout] 445 | Endpoint { addr: addr, port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:445:32 [INFO] [stdout] | [INFO] [stdout] 445 | Endpoint { addr: addr, port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:492:48 [INFO] [stdout] | [INFO] [stdout] 492 | Endpoint { addr: Address::Unspecified, port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:498:39 [INFO] [stdout] | [INFO] [stdout] 498 | Endpoint { addr: addr.into(), port: port } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:693:21 [INFO] [stdout] | [INFO] [stdout] 693 | src_addr: src_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `src_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/wire/./ipv6fragment.rs:200:6 [INFO] [stdout] | [INFO] [stdout] 200 | impl<'a> fmt::Display for Repr { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:694:21 [INFO] [stdout] | [INFO] [stdout] 694 | dst_addr: dst_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dst_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:695:21 [INFO] [stdout] | [INFO] [stdout] 695 | protocol: protocol, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `protocol` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:696:21 [INFO] [stdout] | [INFO] [stdout] 696 | payload_len: payload_len, hop_limit [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `payload_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:706:21 [INFO] [stdout] | [INFO] [stdout] 706 | src_addr: src_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `src_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:707:21 [INFO] [stdout] | [INFO] [stdout] 707 | dst_addr: dst_addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dst_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:709:21 [INFO] [stdout] | [INFO] [stdout] 709 | payload_len: payload_len, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `payload_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ip.rs:710:21 [INFO] [stdout] | [INFO] [stdout] 710 | hop_limit: hop_limit [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `hop_limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/wire/./ipv6routing.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 312 | data[field::PAD] = data[field::PAD] & 0xF0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data[field::PAD] &= 0xF0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./ipv4.rs:622:17 [INFO] [stdout] | [INFO] [stdout] 622 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6routing.rs:377:6 [INFO] [stdout] | [INFO] [stdout] 377 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 377 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] 377 + impl + ?Sized> fmt::Display for Header<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./ipv4.rs:915:13 [INFO] [stdout] | [INFO] [stdout] 915 | payload_len: payload_len, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `payload_len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6routing.rs:467:9 [INFO] [stdout] | [INFO] [stdout] 467 | / match self { [INFO] [stdout] 468 | | &Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 469 | | header.set_next_header(next_header); [INFO] [stdout] 470 | | header.set_header_len(length); [INFO] [stdout] ... | [INFO] [stdout] 488 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 489 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 467 ~ match *self { [INFO] [stdout] 468 ~ Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 469 | header.set_next_header(next_header); [INFO] [stdout] ... [INFO] [stdout] 475 | } [INFO] [stdout] 476 ~ Repr::Rpl { next_header, length, segments_left, cmpr_i, cmpr_e, pad, addresses } => { [INFO] [stdout] 477 | header.set_next_header(next_header); [INFO] [stdout] ... [INFO] [stdout] 487 | [INFO] [stdout] 488 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6routing.rs:495:9 [INFO] [stdout] | [INFO] [stdout] 495 | / match self { [INFO] [stdout] 496 | | &Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 497 | | write!(f, "IPv6 Routing next_hdr={} length={} type={} seg_left={} home_address={}", [INFO] [stdout] 498 | | next_header, length, Type::Type2, segments_left, home_address) [INFO] [stdout] ... | [INFO] [stdout] 505 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 506 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 495 ~ match *self { [INFO] [stdout] 496 ~ Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 497 | write!(f, "IPv6 Routing next_hdr={} length={} type={} seg_left={} home_address={}", [INFO] [stdout] 498 | next_header, length, Type::Type2, segments_left, home_address) [INFO] [stdout] 499 | } [INFO] [stdout] 500 ~ Repr::Rpl { next_header, length, segments_left, cmpr_i, cmpr_e, pad, .. } => { [INFO] [stdout] 501 | write!(f, "IPv6 Routing next_hdr={} length={} type={} seg_left={} cmpr_i={} cmpr_e={} pad={}", [INFO] [stdout] ... [INFO] [stdout] 504 | [INFO] [stdout] 505 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `proto-ipv4` [INFO] [stdout] --> src/wire/./ipv6.rs:999:15 [INFO] [stdout] | [INFO] [stdout] 999 | #[cfg(feature = "proto-ipv4")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `alloc`, `default`, `libc`, `std`, and `sys` [INFO] [stdout] = help: consider adding `proto-ipv4` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./icmpv4.rs:541:9 [INFO] [stdout] | [INFO] [stdout] 541 | / match self { [INFO] [stdout] 542 | | &Repr::EchoRequest { ident, seq_no, payload: _ } => { [INFO] [stdout] 543 | | packet.set_msg_type(Message::EchoRequest); [INFO] [stdout] 544 | | packet.set_msg_code(0); [INFO] [stdout] ... | [INFO] [stdout] 564 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 565 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 541 ~ match *self { [INFO] [stdout] 542 ~ Repr::EchoRequest { ident, seq_no, payload: _ } => { [INFO] [stdout] 543 | packet.set_msg_type(Message::EchoRequest); [INFO] [stdout] ... [INFO] [stdout] 548 | [INFO] [stdout] 549 ~ Repr::EchoReply { ident, seq_no, payload: _ } => { [INFO] [stdout] 550 | packet.set_msg_type(Message::EchoReply); [INFO] [stdout] ... [INFO] [stdout] 555 | [INFO] [stdout] 556 ~ Repr::DstUnreachable { reason, header, } => { [INFO] [stdout] 557 | packet.set_msg_type(Message::DstUnreachable); [INFO] [stdout] ... [INFO] [stdout] 563 | [INFO] [stdout] 564 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/./icmpv4.rs:579:27 [INFO] [stdout] | [INFO] [stdout] 579 | match Repr::parse(&self, Checksum::Manual) { [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./icmpv4.rs:596:9 [INFO] [stdout] | [INFO] [stdout] 596 | / match self { [INFO] [stdout] 597 | | &Repr::EchoRequest { ident, seq_no, payload } => [INFO] [stdout] 598 | | write!(f, "ICMPv4 echo request id={} seq={} len={}", [INFO] [stdout] 599 | | ident, seq_no, payload), [INFO] [stdout] ... | [INFO] [stdout] 606 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 607 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 596 ~ match *self { [INFO] [stdout] 597 ~ Repr::EchoRequest { ident, seq_no, payload } => [INFO] [stdout] 598 | write!(f, "ICMPv4 echo request id={} seq={} len={}", [INFO] [stdout] 599 | ident, seq_no, payload), [INFO] [stdout] 600 ~ Repr::EchoReply { ident, seq_no, payload } => [INFO] [stdout] 601 | write!(f, "ICMPv4 echo reply id={} seq={} len={}", [INFO] [stdout] 602 | ident, seq_no, payload), [INFO] [stdout] 603 ~ Repr::DstUnreachable { reason, .. } => [INFO] [stdout] 604 | write!(f, "ICMPv4 destination unreachable ({})", [INFO] [stdout] 605 | reason), [INFO] [stdout] 606 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `udp` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/wire/./udp.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn len(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./icmpv4.rs:298:17 [INFO] [stdout] | [INFO] [stdout] 298 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/wire/./tcp.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use core::{i32, ops, cmp, fmt}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./udp.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:243:15 [INFO] [stdout] | [INFO] [stdout] 243 | while options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/wire/./tcp.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / match option { [INFO] [stdout] 246 | | TcpOption::SackPermitted => { [INFO] [stdout] 247 | | return Ok(true); [INFO] [stdout] 248 | | }, [INFO] [stdout] 249 | | _ => {}, [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 245 ~ if option == TcpOption::SackPermitted { [INFO] [stdout] 246 + return Ok(true); [INFO] [stdout] 247 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `fuzzing` [INFO] [stdout] --> src/wire/./tcp.rs:286:17 [INFO] [stdout] | [INFO] [stdout] 286 | if cfg!(fuzzing) { return true } [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 's [INFO] [stdout] --> src/wire/./tcp.rs:259:33 [INFO] [stdout] | [INFO] [stdout] 259 | pub fn selective_ack_ranges<'s>( [INFO] [stdout] | ^^ [INFO] [stdout] 260 | &'s self [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 259 ~ pub fn selective_ack_ranges( [INFO] [stdout] 260 ~ &self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:264:15 [INFO] [stdout] | [INFO] [stdout] 264 | while options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/wire/./tcp.rs:266:13 [INFO] [stdout] | [INFO] [stdout] 266 | / match option { [INFO] [stdout] 267 | | TcpOption::SackRange(slice) => { [INFO] [stdout] 268 | | return Ok(slice); [INFO] [stdout] 269 | | }, [INFO] [stdout] 270 | | _ => {}, [INFO] [stdout] 271 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 ~ if let TcpOption::SackRange(slice) = option { [INFO] [stdout] 267 + return Ok(slice); [INFO] [stdout] 268 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:705:55 [INFO] [stdout] | [INFO] [stdout] 705 | option = TcpOption::Unknown { kind: kind, data: data } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:705:67 [INFO] [stdout] | [INFO] [stdout] 705 | option = TcpOption::Unknown { kind: kind, data: data } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `NetworkEndian::read_u16` doesn't need a mutable reference [INFO] [stdout] --> src/wire/./tcp.rs:365:45 [INFO] [stdout] | [INFO] [stdout] 365 | let field = NetworkEndian::read_u16(&mut data[field::FLAGS]) & !0xfff; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 365 - let field = NetworkEndian::read_u16(&mut data[field::FLAGS]) & !0xfff; [INFO] [stdout] 365 + let field = NetworkEndian::read_u16(&data[field::FLAGS]) & !0xfff; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:919:13 [INFO] [stdout] | [INFO] [stdout] 919 | flags: flags, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `flags` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:921:13 [INFO] [stdout] | [INFO] [stdout] 921 | ack_number: ack_number, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ack_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:923:13 [INFO] [stdout] | [INFO] [stdout] 923 | window_scale: window_scale, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_scale` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:924:13 [INFO] [stdout] | [INFO] [stdout] 924 | max_seg_size: max_seg_size, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_seg_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:925:13 [INFO] [stdout] | [INFO] [stdout] 925 | sack_permitted: sack_permitted, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sack_permitted` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wire/./tcp.rs:926:13 [INFO] [stdout] | [INFO] [stdout] 926 | sack_ranges: sack_ranges, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sack_ranges` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/wire/./tcp.rs:1013:13 [INFO] [stdout] | [INFO] [stdout] 1013 | (self.flags.syn() | self.flags.fin() | self.flags.rst()) [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] 1013 - (self.flags.syn() | self.flags.fin() | self.flags.rst()) [INFO] [stdout] 1013 + self.flags.syn() | self.flags.fin() | self.flags.rst() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `buffer.get(0)` [INFO] [stdout] --> src/wire/./tcp.rs:639:16 [INFO] [stdout] | [INFO] [stdout] 639 | match *buffer.get(0).ok_or(Error::Truncated)? { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `buffer.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:888:15 [INFO] [stdout] | [INFO] [stdout] 888 | while options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/wire/./tcp.rs:952:12 [INFO] [stdout] | [INFO] [stdout] 952 | if length % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `!length.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/wire/./tcp.rs:968:9 [INFO] [stdout] | [INFO] [stdout] 968 | usize::from(self.header_len()) + usize::from(self.payload_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `usize::from()`: `self.header_len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:998:16 [INFO] [stdout] | [INFO] [stdout] 998 | if options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./tcp.rs:1018:6 [INFO] [stdout] | [INFO] [stdout] 1018 | impl<'a, T: Payload + ?Sized> fmt::Display for Packet<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1018 - impl<'a, T: Payload + ?Sized> fmt::Display for Packet<&'a T> { [INFO] [stdout] 1018 + impl fmt::Display for Packet<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/wire/payload.rs:302:13 [INFO] [stdout] | [INFO] [stdout] 302 | Ok(self.resize(length, 0u8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 302 ~ self.resize(length, 0u8); [INFO] [stdout] 303 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./arp.rs:315:1 [INFO] [stdout] | [INFO] [stdout] 315 | / pub enum Repr { [INFO] [stdout] 316 | | /// An Ethernet and IPv4 Address Resolution Protocol packet. [INFO] [stdout] 317 | | EthernetIpv4 { [INFO] [stdout] 318 | | operation: Operation, [INFO] [stdout] ... | [INFO] [stdout] 325 | | __Nonexhaustive, [INFO] [stdout] 326 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./arp.rs:325:5 [INFO] [stdout] | [INFO] [stdout] 325 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] = note: `#[warn(clippy::manual_non_exhaustive)]` on by default [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 315 + #[non_exhaustive] [INFO] [stdout] 316 | pub enum Repr { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / pub enum Version { [INFO] [stdout] 25 | | Unspecified, [INFO] [stdout] 26 | | Ipv4, [INFO] [stdout] 27 | | Ipv6, [INFO] [stdout] 28 | | #[doc(hidden)] [INFO] [stdout] 29 | | __Nonexhaustive, [INFO] [stdout] 30 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 24 + #[non_exhaustive] [INFO] [stdout] 25 | pub enum Version { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:93:1 [INFO] [stdout] | [INFO] [stdout] 93 | / pub enum Address { [INFO] [stdout] 94 | | /// An unspecified address. [INFO] [stdout] 95 | | /// May be used as a placeholder for storage where the address is not assigned yet. [INFO] [stdout] 96 | | Unspecified, [INFO] [stdout] ... | [INFO] [stdout] 105 | | __Nonexhaustive [INFO] [stdout] 106 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 93 + #[non_exhaustive] [INFO] [stdout] 94 | pub enum Address { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:268:1 [INFO] [stdout] | [INFO] [stdout] 268 | / pub enum Cidr { [INFO] [stdout] 269 | | Ipv4(Ipv4Cidr), [INFO] [stdout] 270 | | Ipv6(Ipv6Cidr), [INFO] [stdout] 271 | | #[doc(hidden)] [INFO] [stdout] 272 | | __Nonexhaustive, [INFO] [stdout] 273 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 272 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 268 + #[non_exhaustive] [INFO] [stdout] 269 | pub enum Cidr { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:278:1 [INFO] [stdout] | [INFO] [stdout] 278 | / pub enum Subnet { [INFO] [stdout] 279 | | Ipv4(Ipv4Subnet), [INFO] [stdout] 280 | | Ipv6(Ipv6Subnet), [INFO] [stdout] 281 | | #[doc(hidden)] [INFO] [stdout] 282 | | __Nonexhaustive, [INFO] [stdout] 283 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:282:5 [INFO] [stdout] | [INFO] [stdout] 282 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 278 + #[non_exhaustive] [INFO] [stdout] 279 | pub enum Subnet { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ipv6option.rs:217:1 [INFO] [stdout] | [INFO] [stdout] 217 | / pub enum Repr<'a> { [INFO] [stdout] 218 | | Pad1, [INFO] [stdout] 219 | | PadN(u8), [INFO] [stdout] 220 | | Unknown { [INFO] [stdout] ... | [INFO] [stdout] 227 | | __Nonexhaustive [INFO] [stdout] 228 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ipv6option.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 217 + #[non_exhaustive] [INFO] [stdout] 218 | pub enum Repr<'a> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ipv6routing.rs:391:1 [INFO] [stdout] | [INFO] [stdout] 391 | / pub enum Repr<'a> { [INFO] [stdout] 392 | | Type2 { [INFO] [stdout] 393 | | /// The type of header immediately following the Routing header. [INFO] [stdout] 394 | | next_header: Protocol, [INFO] [stdout] ... | [INFO] [stdout] 421 | | __Nonexhaustive [INFO] [stdout] 422 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ipv6routing.rs:421:5 [INFO] [stdout] | [INFO] [stdout] 421 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 391 + #[non_exhaustive] [INFO] [stdout] 392 | pub enum Repr<'a> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./icmpv4.rs:441:1 [INFO] [stdout] | [INFO] [stdout] 441 | / pub enum Repr { [INFO] [stdout] 442 | | EchoRequest { [INFO] [stdout] 443 | | ident: u16, [INFO] [stdout] 444 | | seq_no: u16, [INFO] [stdout] ... | [INFO] [stdout] 457 | | __Nonexhaustive [INFO] [stdout] 458 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./icmpv4.rs:457:5 [INFO] [stdout] | [INFO] [stdout] 457 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 441 + #[non_exhaustive] [INFO] [stdout] 442 | pub enum Repr { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/nic/loopback.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | fn next_recv(&mut self) -> Option<(AckRecv, &mut C)> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^ ^^^^^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is hidden here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 51 | fn next_recv(&mut self) -> Option<(AckRecv<'_>, &mut C)> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/nic/loopback.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | fn next_send(&mut self) -> Option<(AckSend, &mut C)> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^ ^^^^^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is hidden here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 62 | fn next_send(&mut self) -> Option<(AckSend<'_>, &mut C)> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/arp/neighbor.rs:311:20 [INFO] [stdout] | [INFO] [stdout] 311 | pub fn missing(&self) -> Missing { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 311 | pub fn missing(&self) -> Missing<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/arp/packet.rs:64:23 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 64 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/eth/packet.rs:78:23 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 78 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:104:19 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn answer(&mut self) -> Receiver { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 104 | pub fn answer(&mut self) -> Receiver<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:109:20 [INFO] [stdout] | [INFO] [stdout] 109 | pub fn recv(&mut self, handler: H) -> Receiver { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 109 | pub fn recv(&mut self, handler: H) -> Receiver<'_, H> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:114:25 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn recv_with(&mut self, handler: H) -> Receiver> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 114 | pub fn recv_with(&mut self, handler: H) -> Receiver<'_, FnHandler> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:119:20 [INFO] [stdout] | [INFO] [stdout] 119 | pub fn send(&mut self, handler: H) -> Sender { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 119 | pub fn send(&mut self, handler: H) -> Sender<'_, H> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | pub fn send_with(&mut self, handler: H) -> Sender> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 124 | pub fn send_with(&mut self, handler: H) -> Sender<'_, FnHandler> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:130:16 [INFO] [stdout] | [INFO] [stdout] 130 | fn get_mut(&mut self) -> EndpointRef { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 130 | fn get_mut(&mut self) -> EndpointRef<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/packet.rs:80:23 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 80 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/ip/packet.rs:130:23 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 130 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a method [INFO] [stdout] --> src/layer/ip/packet.rs:267:5 [INFO] [stdout] | [INFO] [stdout] 267 | pub fn control(&self) -> &Controller<'a> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | #![warn(missing_docs)] [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/loss/mod.rs:77:21 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn lossy(&mut self, layer: I) -> Lossy { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 77 | pub fn lossy(&mut self, layer: I) -> Lossy<'_, I> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/udp/packet.rs:86:23 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 86 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/connection.rs:362:14 [INFO] [stdout] | [INFO] [stdout] 362 | fn entry(&mut self, index: SlotKey) -> Option; [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 362 | fn entry(&mut self, index: SlotKey) -> Option>; [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/connection.rs:366:19 [INFO] [stdout] | [INFO] [stdout] 366 | fn find_tuple(&mut self, tuple: FourTuple) -> Option; [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 366 | fn find_tuple(&mut self, tuple: FourTuple) -> Option>; [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/connection.rs:1325:14 [INFO] [stdout] | [INFO] [stdout] 1325 | fn entry(&mut self) -> Entry { [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1325 | fn entry(&mut self) -> Entry<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:163:25 [INFO] [stdout] | [INFO] [stdout] 163 | pub(crate) fn entry(&mut self, index: SlotKey) [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 164 | -> Option [INFO] [stdout] | ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 164 | -> Option> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:185:36 [INFO] [stdout] | [INFO] [stdout] 185 | pub(crate) fn entry_from_tuple(&mut self, tuple: FourTuple) [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 186 | -> Option [INFO] [stdout] | ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 186 | -> Option> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:440:14 [INFO] [stdout] | [INFO] [stdout] 440 | fn entry(&mut self, index: SlotKey) -> Option { [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 440 | fn entry(&mut self, index: SlotKey) -> Option> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:444:19 [INFO] [stdout] | [INFO] [stdout] 444 | fn find_tuple(&mut self, tuple: FourTuple) -> Option { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 444 | fn find_tuple(&mut self, tuple: FourTuple) -> Option> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/managed/phantom_alloc/phantom_btree.rs:84:18 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn entry(&mut self, key: K) -> Entry { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 84 | pub fn entry(&mut self, key: K) -> Entry<'_, K, V> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/wire/./ipv6hopbyhop.rs:193:20 [INFO] [stdout] | [INFO] [stdout] 193 | pub fn options(&self) -> Ipv6OptionsIterator { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 193 | pub fn options(&self) -> Ipv6OptionsIterator<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `core::mem::replace` that must be used [INFO] [stdout] --> src/wire/payload.rs:276:9 [INFO] [stdout] | [INFO] [stdout] 276 | core::mem::replace(self, inner); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: if you don't need the old value, you can just assign the new value directly [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 276 | let _ = core::mem::replace(self, inner); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./ethernet.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / enum_with_unknown! { [INFO] [stdout] 9 | | /// Ethernet protocol type. [INFO] [stdout] 10 | | pub enum EtherType(u16) { [INFO] [stdout] 11 | | Ipv4 = 0x0800, [INFO] [stdout] ... | [INFO] [stdout] 16 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(invalid_doc_attributes)]` on by default [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./arp.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / enum_with_unknown! { [INFO] [stdout] 12 | | /// ARP hardware type. [INFO] [stdout] 13 | | pub enum Hardware(u16) { [INFO] [stdout] 14 | | Ethernet = 1 [INFO] [stdout] 15 | | } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./arp.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / enum_with_unknown! { [INFO] [stdout] 19 | | /// ARP operation type. [INFO] [stdout] 20 | | pub enum Operation(u16) { [INFO] [stdout] 21 | | Request = 1, [INFO] [stdout] ... | [INFO] [stdout] 24 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./ip.rs:57:1 [INFO] [stdout] | [INFO] [stdout] 57 | / enum_with_unknown! { [INFO] [stdout] 58 | | /// IP datagram encapsulated protocol. [INFO] [stdout] 59 | | pub enum Protocol(u8) { [INFO] [stdout] 60 | | HopByHop = 0x00, [INFO] [stdout] ... | [INFO] [stdout] 71 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown `doc` attribute `shown` [INFO] [stdout] --> src/macros.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | $($(#[$val_attr])* #[doc(shown)] $variant = $value ),+ [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/wire/./ipv6.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / enum_with_unknown! { [INFO] [stdout] 32 | | /// IPv6 multicast scope. [INFO] [stdout] 33 | | pub enum Scope(u8) { [INFO] [stdout] 34 | | /// The address is valid for the interface alone. [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |_- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `enum_with_unknown` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `silent_until` is never read [INFO] [stdout] --> src/layer/arp/neighbor.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 107 | pub struct Cache<'a> { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 108 | storage: Ordered<'a, Neighbor>, [INFO] [stdout] 109 | silent_until: Instant, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Cache` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/nic/common.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | FlagState::SetTrue(b) => Ok(*b = true), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 70 ~ FlagState::SetTrue(b) => { [INFO] [stdout] 71 + let _: () = *b = true; [INFO] [stdout] 72 + Ok(()) [INFO] [stdout] 73 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | //! need to lend their state to a specific packet. Instead, each method offered by its packet [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 102 | //! need to lend their state to a specific packet. Instead, each method offered by its packet [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | //! representation mutates some aspects in a local context. The same would also be possible with a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 103 | //! representation mutates some aspects in a local context. The same would also be possible with a [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | //! shared reference to a `RefCell<_>` of the internal state by calling [`RefCell::borrow_mut`]. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 104 | //! shared reference to a `RefCell<_>` of the internal state by calling [`RefCell::borrow_mut`]. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | //! the packet given to the upper layer. Such a layer is not re-entrant. If the upper layer is a [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 106 | //! the packet given to the upper layer. Such a layer is not re-entrant. If the upper layer is a [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | //! tunnel of sorts that unpacks an encapsulated lower layer packet then the reentry will fail to [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 107 | //! tunnel of sorts that unpacks an encapsulated lower layer packet then the reentry will fail to [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:108:5 [INFO] [stdout] | [INFO] [stdout] 108 | //! again borrow from the `RefCell`. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 108 | //! again borrow from the `RefCell`. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/layer/mod.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | //! independently. The splitting function can be based on ip subnet or on a hash for example. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 112 | //! independently. The splitting function can be based on ip subnet or on a hash for example. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/layer/arp/endpoint.rs:193:16 [INFO] [stdout] | [INFO] [stdout] 193 | if let Some(_) = self.inner.neighbors.lookup(prot_addr, time) { [INFO] [stdout] | -------^^^^^^^----------------------------------------------- help: try: `if self.inner.neighbors.lookup(prot_addr, time).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/layer/arp/endpoint.rs:217:16 [INFO] [stdout] | [INFO] [stdout] 217 | if let Err(_) = self.endpoint.handle_internally(packet) { [INFO] [stdout] | -------^^^^^^------------------------------------------ help: try: `if self.endpoint.handle_internally(packet).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/layer/arp/endpoint.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | if let Err(_) = self.endpoint.send_oustanding(packet) { [INFO] [stdout] | -------^^^^^^---------------------------------------- help: try: `if self.endpoint.send_oustanding(packet).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/layer/arp/neighbor.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | / impl Default for Mapping { [INFO] [stdout] 55 | | fn default() -> Self { [INFO] [stdout] 56 | | Mapping::LookingFor [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 43 + #[derive(Default)] [INFO] [stdout] 44 | pub enum Mapping { [INFO] [stdout] 45 | /// An address is present. [INFO] [stdout] ... [INFO] [stdout] 48 | /// We don't have a mapping but want to have one. [INFO] [stdout] 49 ~ #[default] [INFO] [stdout] 50 ~ LookingFor, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/layer/arp/neighbor.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | / self.inner.by_ref() [INFO] [stdout] 374 | | .filter(|entry| entry.hardware_addr().is_none()) [INFO] [stdout] 375 | | .next() [INFO] [stdout] | |___________________^ help: try: `self.inner.by_ref().find(|entry| entry.hardware_addr().is_none())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/layer/ip/endpoint.rs:203:26 [INFO] [stdout] | [INFO] [stdout] 203 | fn into_arp_receiver(&mut self) -> layer::arp::Receiver<'_, 'data> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/layer/ip/endpoint.rs:208:24 [INFO] [stdout] | [INFO] [stdout] 208 | fn into_arp_sender(&mut self) -> layer::arp::Sender<'_, 'data> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/layer/ip/packet.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | / match &mut self.packet { [INFO] [stdout] 242 | | IpPacket::V4(ipv4) => { [INFO] [stdout] 243 | | // Recalculate the checksum if necessary. [INFO] [stdout] 244 | | ipv4.fill_checksum(capabilities.ipv4().tx_checksum()); [INFO] [stdout] 245 | | }, [INFO] [stdout] 246 | | _ => (), [INFO] [stdout] 247 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 241 ~ if let IpPacket::V4(ipv4) = &mut self.packet { [INFO] [stdout] 242 + // Recalculate the checksum if necessary. [INFO] [stdout] 243 + ipv4.fill_checksum(capabilities.ipv4().tx_checksum()); [INFO] [stdout] 244 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/ip/packet.rs:309:24 [INFO] [stdout] | [INFO] [stdout] 309 | hop_limit: u8::max_value(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 309 - hop_limit: u8::max_value(), [INFO] [stdout] 309 + hop_limit: u8::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `wire::raw::ip::Address` [INFO] [stdout] --> src/layer/ip/route.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | next_hop: Address::v4(0, 0, 0, 0).into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Address::v4(0, 0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `wire::raw::ip::Address` [INFO] [stdout] --> src/layer/ip/route.rs:54:23 [INFO] [stdout] | [INFO] [stdout] 54 | next_hop: Address::v6(0, 0, 0, 0, 0, 0, 0, 0).into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Address::v6(0, 0, 0, 0, 0, 0, 0, 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/layer/ip/route.rs:140:28 [INFO] [stdout] | [INFO] [stdout] 140 | Some(place) => Ok(*place = route), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 140 ~ Some(place) => { [INFO] [stdout] 141 + let _: () = *place = route; [INFO] [stdout] 142 + Ok(()) [INFO] [stdout] 143 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/loss/mod.rs:92:28 [INFO] [stdout] | [INFO] [stdout] 92 | lossrate: Some(u32::max_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 92 - lossrate: Some(u32::max_value()), [INFO] [stdout] 92 + lossrate: Some(u32::MAX), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/layer/loss/mod.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / pub fn next(&mut self) -> u64 { [INFO] [stdout] 128 | | let s = &mut self.state; [INFO] [stdout] 129 | | let result_starstar = s[1] [INFO] [stdout] 130 | | .wrapping_mul(5) [INFO] [stdout] ... | [INFO] [stdout] 145 | | result_starstar [INFO] [stdout] 146 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` 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: doc quote line without `>` marker [INFO] [stdout] --> src/layer/tcp/mod.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | //! of TCP Reno, Raid Y. Zaghal and Javed I. Khan, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this not intended to be a quote at all, escape it with `\>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: add markers to start of line [INFO] [stdout] | [INFO] [stdout] 74 | //! > of TCP Reno, Raid Y. Zaghal and Javed I. Khan, [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc quote line without `>` marker [INFO] [stdout] --> src/layer/tcp/mod.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | //! incoming segment except another reset. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this not intended to be a quote at all, escape it with `\>` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: add markers to start of line [INFO] [stdout] | [INFO] [stdout] 91 | //! > incoming segment except another reset. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:519:9 [INFO] [stdout] | [INFO] [stdout] 519 | return signals; [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] 519 - return signals; [INFO] [stdout] 519 + signals [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:660:9 [INFO] [stdout] | [INFO] [stdout] 660 | return Signals::default(); [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] 660 - return Signals::default(); [INFO] [stdout] 660 + Signals::default() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:603:17 [INFO] [stdout] | [INFO] [stdout] 603 | / signals.answer = Some(InnerRepr { [INFO] [stdout] 604 | | flags: tcp::Flags::RST, [INFO] [stdout] 605 | | seq_number: ack, [INFO] [stdout] 606 | | ack_number: Some(segment.seq_number), [INFO] [stdout] ... | [INFO] [stdout] 612 | | payload_len: 0, [INFO] [stdout] 613 | | }.send_back(segment)); [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { answer: Some(InnerRepr { [INFO] [stdout] flags: tcp::Flags::RST, [INFO] [stdout] seq_number: ack, [INFO] [stdout] ack_number: Some(segment.seq_number), [INFO] [stdout] window_len: 0, [INFO] [stdout] window_scale: None, [INFO] [stdout] max_seg_size: None, [INFO] [stdout] sack_permitted: false, [INFO] [stdout] sack_ranges: [None; 3], [INFO] [stdout] payload_len: 0, [INFO] [stdout] }.send_back(segment)), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:602:17 [INFO] [stdout] | [INFO] [stdout] 602 | let mut signals = Signals::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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:652:13 [INFO] [stdout] | [INFO] [stdout] 652 | signals.answer = Some(self.send_open(true, entry.four_tuple())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { answer: Some(self.send_open(true, entry.four_tuple())), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:651:13 [INFO] [stdout] | [INFO] [stdout] 651 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:740:9 [INFO] [stdout] | [INFO] [stdout] 740 | signals.receive = Some(segment_ack); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { receive: Some(segment_ack), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:739:9 [INFO] [stdout] | [INFO] [stdout] 739 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:766:9 [INFO] [stdout] | [INFO] [stdout] 766 | return signals; [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] 766 - return signals; [INFO] [stdout] 766 + signals [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:764:9 [INFO] [stdout] | [INFO] [stdout] 764 | signals.reset = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { reset: true, delete: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:763:9 [INFO] [stdout] | [INFO] [stdout] 763 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:776:9 [INFO] [stdout] | [INFO] [stdout] 776 | signals.reset = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { reset: true, delete: true, answer: Some(InnerRepr { [INFO] [stdout] flags: tcp::Flags::RST, [INFO] [stdout] seq_number: self.send.next, [INFO] [stdout] ack_number: Some(self.ack_all()), [INFO] [stdout] window_len: 0, [INFO] [stdout] window_scale: None, [INFO] [stdout] max_seg_size: None, [INFO] [stdout] sack_permitted: false, [INFO] [stdout] sack_ranges: [None; 3], [INFO] [stdout] payload_len: 0, [INFO] [stdout] }.send_to(entry.four_tuple())), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:775:9 [INFO] [stdout] | [INFO] [stdout] 775 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layer/tcp/connection.rs:796:9 [INFO] [stdout] | [INFO] [stdout] 796 | return signals; [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] 796 - return signals; [INFO] [stdout] 796 + signals [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layer/tcp/connection.rs:795:9 [INFO] [stdout] | [INFO] [stdout] 795 | signals.answer = Some(self.repr_ack_all(remote)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layer::tcp::connection::Signals { answer: Some(self.repr_ack_all(remote)), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layer/tcp/connection.rs:794:9 [INFO] [stdout] | [INFO] [stdout] 794 | let mut signals = Signals::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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layer/tcp/connection.rs:917:21 [INFO] [stdout] | [INFO] [stdout] 917 | assert!(range.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!range.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/layer/tcp/connection.rs:919:43 [INFO] [stdout] | [INFO] [stdout] 919 | let is_fin = available.fin && end as usize == available.total; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `end` [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: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/connection.rs:1160:29 [INFO] [stdout] | [INFO] [stdout] 1160 | let max = u32::from(u16::max_value()) << self.window_scale; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 1160 - let max = u32::from(u16::max_value()) << self.window_scale; [INFO] [stdout] 1160 + let max = u32::from(u16::MAX) << self.window_scale; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/layer/tcp/connection.rs:1161:22 [INFO] [stdout] | [INFO] [stdout] 1161 | let capped = u32::try_from(window) [INFO] [stdout] | ______________________^ [INFO] [stdout] 1162 | | .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] | |_________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1162 - .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] 1162 + .unwrap_or(u32::max_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/connection.rs:1162:33 [INFO] [stdout] | [INFO] [stdout] 1162 | .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 1162 - .unwrap_or_else(|_| u32::max_value()) [INFO] [stdout] 1162 + .unwrap_or_else(|_| u32::MAX) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/layer/tcp/connection.rs:1287:19 [INFO] [stdout] | [INFO] [stdout] 1287 | let key = match endpoint.find_tuple(tuple) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 1288 | | Some(entry) => Some(entry.slot_key()), [INFO] [stdout] 1289 | | None => None, [INFO] [stdout] 1290 | | }; [INFO] [stdout] | |_________^ help: try: `endpoint.find_tuple(tuple).map(|entry| entry.slot_key())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/layer/tcp/connection.rs:1334:1 [INFO] [stdout] | [INFO] [stdout] 1334 | / impl Default for State { [INFO] [stdout] 1335 | | fn default() -> Self { [INFO] [stdout] 1336 | | State::Closed [INFO] [stdout] 1337 | | } [INFO] [stdout] 1338 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 189 + #[derive(Default)] [INFO] [stdout] 190 | pub enum State { [INFO] [stdout] 191 | /// Marker state fo an unintended/uninitialized connection state. [INFO] [stdout] 192 ~ #[default] [INFO] [stdout] 193 ~ Closed, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/endpoint.rs:277:27 [INFO] [stdout] | [INFO] [stdout] 277 | ssthresh: u32::max_value(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 277 - ssthresh: u32::max_value(), [INFO] [stdout] 277 + ssthresh: u32::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layer/tcp/endpoint.rs:507:30 [INFO] [stdout] | [INFO] [stdout] 507 | Err(_) => return (), [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layer/tcp/endpoint.rs:514:30 [INFO] [stdout] | [INFO] [stdout] 514 | Err(_) => return (), [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/layer/tcp/io.rs:359:9 [INFO] [stdout] | [INFO] [stdout] 359 | usize::max_value() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 359 - usize::max_value() [INFO] [stdout] 359 + usize::MAX [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `debug_assert_eq!` with a literal bool [INFO] [stdout] --> src/layer/tcp/packet.rs:298:9 [INFO] [stdout] | [INFO] [stdout] 298 | debug_assert_eq!(signals.reset, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `debug_assert!(..)` [INFO] [stdout] | [INFO] [stdout] 298 - debug_assert_eq!(signals.reset, false); [INFO] [stdout] 298 + debug_assert!(!signals.reset); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Repr` which implements the `Copy` trait [INFO] [stdout] --> src/layer/tcp/packet.rs:568:62 [INFO] [stdout] | [INFO] [stdout] 568 | let raw_packet = tcp::Packet::new_unchecked(&mut packet, answer.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `answer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Repr` which implements the `Copy` trait [INFO] [stdout] --> src/layer/tcp/packet.rs:570:66 [INFO] [stdout] | [INFO] [stdout] 570 | let mut raw_packet = tcp::Packet::new_unchecked(&mut packet, answer.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `answer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/layer/tcp/socket.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / match self.state { [INFO] [stdout] 101 | | ClientState::Finished => true, [INFO] [stdout] 102 | | _ => false, [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 100 - match self.state { [INFO] [stdout] 101 - ClientState::Finished => true, [INFO] [stdout] 102 - _ => false, [INFO] [stdout] 103 - } [INFO] [stdout] 100 + matches!(self.state, ClientState::Finished) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/managed/ordered.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if !(prev <= &new) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(prev > &new)` [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/managed/ordered.rs:96:16 [INFO] [stdout] | [INFO] [stdout] 96 | if !(&new <= next) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(&new > next)` [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: usage of a legacy numeric method [INFO] [stdout] --> src/managed/ordered.rs:86:33 [INFO] [stdout] | [INFO] [stdout] 86 | assert!(mutable.len() < usize::max_value()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 86 - assert!(mutable.len() < usize::max_value()); [INFO] [stdout] 86 + assert!(mutable.len() < usize::MAX); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/managed/slotmap.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | / if self.get(index).is_none() { [INFO] [stdout] 184 | | return None [INFO] [stdout] 185 | | } [INFO] [stdout] | |_________^ help: replace it with: `self.get(index)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/managed/slotmap.rs:275:28 [INFO] [stdout] | [INFO] [stdout] 275 | assert!(capacity < isize::max_value() as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 275 - assert!(capacity < isize::max_value() as usize); [INFO] [stdout] 275 + assert!(capacity < isize::MAX as usize); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/managed/slotmap.rs:339:26 [INFO] [stdout] | [INFO] [stdout] 339 | assert!(offset < isize::max_value() as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 339 - assert!(offset < isize::max_value() as usize); [INFO] [stdout] 339 + assert!(offset < isize::MAX as usize); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/storage/assembler.rs:195:5 [INFO] [stdout] | [INFO] [stdout] 195 | pub fn add(&mut self, start: u32, size: u32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] = note: `#[warn(clippy::result_unit_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/storage/assembler.rs:196:36 [INFO] [stdout] | [INFO] [stdout] 196 | self.add_impl(start, size, u32::max_value()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 196 - self.add_impl(start, size, u32::max_value()) [INFO] [stdout] 196 + self.add_impl(start, size, u32::MAX) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this returns a `Result<_, ()>` [INFO] [stdout] --> src/storage/assembler.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | pub fn bounded_add(&mut self, start: u32, size: u32, max: u32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use a custom `Error` type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/storage/assembler.rs:425:13 [INFO] [stdout] | [INFO] [stdout] 425 | self.left = self.left + contig.hole_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.left += contig.hole_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/storage/ring_buffer.rs:120:16 [INFO] [stdout] | [INFO] [stdout] 120 | if let Ok(_) = &result { [INFO] [stdout] | -------^^^^^---------- help: try: `if result.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/storage/ring_buffer.rs:131:24 [INFO] [stdout] | [INFO] [stdout] 131 | pub fn enqueue_one<'b>(&'b mut self) -> Option<&'b mut T> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 131 - pub fn enqueue_one<'b>(&'b mut self) -> Option<&'b mut T> { [INFO] [stdout] 131 + pub fn enqueue_one(&mut self) -> Option<&mut T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/storage/ring_buffer.rs:145:16 [INFO] [stdout] | [INFO] [stdout] 145 | if let Ok(_) = &result { [INFO] [stdout] | -------^^^^^---------- help: try: `if result.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/storage/ring_buffer.rs:194:25 [INFO] [stdout] | [INFO] [stdout] 194 | pub fn enqueue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 194 - pub fn enqueue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] 194 + pub fn enqueue_many(&mut self, size: usize) -> &mut [T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/storage/ring_buffer.rs:246:25 [INFO] [stdout] | [INFO] [stdout] 246 | pub fn dequeue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 246 - pub fn dequeue_many<'b>(&'b mut self, size: usize) -> &'b mut [T] { [INFO] [stdout] 246 + pub fn dequeue_many(&mut self, size: usize) -> &mut [T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/storage/ring_buffer.rs:409:51 [INFO] [stdout] | [INFO] [stdout] 409 | let _ = ring.enqueue_one_with::<_, (), _>(|e| Ok(e)); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with the tuple variant itself: `Ok` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/storage/ring_buffer.rs:414:59 [INFO] [stdout] | [INFO] [stdout] 414 | let _ = ring.enqueue_one_with::<_, (), _>(|e| Ok(*e = i)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 414 ~ let _ = ring.enqueue_one_with::<_, (), _>(|e| { [INFO] [stdout] 415 + let _: () = *e = i; [INFO] [stdout] 416 + Ok(()) [INFO] [stdout] 417 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i64::abs()` to u64 [INFO] [stdout] --> src/time.rs:171:31 [INFO] [stdout] | [INFO] [stdout] 171 | Duration::from_millis((self.millis - rhs.millis).abs() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.millis - rhs.millis).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/time.rs:175:1 [INFO] [stdout] | [INFO] [stdout] 175 | / impl Default for Expiration { [INFO] [stdout] 176 | | fn default() -> Self { [INFO] [stdout] 177 | | Expiration::Never [INFO] [stdout] 178 | | } [INFO] [stdout] 179 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 35 + #[derive(Default)] [INFO] [stdout] 36 | pub enum Expiration { [INFO] [stdout] 37 | /// Some finite point in time. [INFO] [stdout] ... [INFO] [stdout] 42 | /// This variant always compares greater or equal to all other possible values of `Expiration`. [INFO] [stdout] 43 ~ #[default] [INFO] [stdout] 44 ~ Never, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/time.rs:199:1 [INFO] [stdout] | [INFO] [stdout] 199 | / impl cmp::PartialOrd for Expiration { [INFO] [stdout] 200 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 | | match (*self, *other) { [INFO] [stdout] 202 | | (Never, Never) => Some(cmp::Ordering::Equal), [INFO] [stdout] ... | [INFO] [stdout] 208 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 200 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 201 - match (*self, *other) { [INFO] [stdout] 202 - (Never, Never) => Some(cmp::Ordering::Equal), [INFO] [stdout] 203 - (Never, When(_)) => Some(cmp::Ordering::Greater), [INFO] [stdout] 204 - (When(_), Never) => Some(cmp::Ordering::Less), [INFO] [stdout] 205 - (When(ref a), When(ref b)) => a.partial_cmp(b), [INFO] [stdout] 206 - } [INFO] [stdout] 207 - } [INFO] [stdout] 200 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::time::Duration` [INFO] [stdout] --> src/time.rs:306:34 [INFO] [stdout] | [INFO] [stdout] 306 | let duration: Duration = std_duration.into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `std_duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::time::Duration` [INFO] [stdout] --> src/time.rs:308:20 [INFO] [stdout] | [INFO] [stdout] 308 | assert_eq!(Duration::from(std_duration), Duration::from_millis(4934)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `Duration::from()`: `std_duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::time::Duration` [INFO] [stdout] --> src/time.rs:310:24 [INFO] [stdout] | [INFO] [stdout] 310 | std_duration = duration.into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider removing `.into()`: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/wire/pretty_print.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | 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] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 51 - write!(f, "\n")?; [INFO] [stdout] 51 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/pretty_print.rs:115:25 [INFO] [stdout] | [INFO] [stdout] 115 | T::pretty_print(&self.buffer, f, &mut PrettyIndent::new(self.prefix)) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `self.buffer` [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: non-canonical implementation of `clone` on a `Copy` type [INFO] [stdout] --> src/wire/pretty_print.rs:120:29 [INFO] [stdout] | [INFO] [stdout] 120 | fn clone(&self) -> Self { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 121 | | Formatter { ..*self } [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____^ help: change this to: `{ *self }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_clone_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> src/wire/pretty_print.rs:129:29 [INFO] [stdout] | [INFO] [stdout] 129 | Formatter { _inner: PhantomData::default() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 129 - Formatter { _inner: PhantomData::default() } [INFO] [stdout] 129 + Formatter { _inner: PhantomData } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/wire/./ethernet.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | if let Some(_) = components.next() { [INFO] [stdout] | -------^^^^^^^-------------------- help: try: `if components.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/./ethernet.rs:374:43 [INFO] [stdout] | [INFO] [stdout] 374 | arp::packet::pretty_print(&frame.payload(), f, indent) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `frame.payload()` [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/wire/./ethernet.rs:378:46 [INFO] [stdout] | [INFO] [stdout] 378 | ip::v4::packet::pretty_print(&frame.payload(), f, indent) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `frame.payload()` [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/wire/./ethernet.rs:382:46 [INFO] [stdout] | [INFO] [stdout] 382 | ip::v6::packet::pretty_print(&frame.payload(), f, indent) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `frame.payload()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/wire/./arp.rs:116:34 [INFO] [stdout] | [INFO] [stdout] 116 | if len < field::OPER.end { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 117 | | Err(Error::Truncated) [INFO] [stdout] 118 | | } else if len < field::TPA(self.hardware_len(), self.protocol_len()).end { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/wire/./arp.rs:118:82 [INFO] [stdout] | [INFO] [stdout] 118 | } else if len < field::TPA(self.hardware_len(), self.protocol_len()).end { [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 119 | | Err(Error::Truncated) [INFO] [stdout] 120 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./arp.rs:363:9 [INFO] [stdout] | [INFO] [stdout] 363 | / match self { [INFO] [stdout] 364 | | &Repr::EthernetIpv4 { .. } => field::TPA(6, 4).end, [INFO] [stdout] 365 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 366 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 363 ~ match *self { [INFO] [stdout] 364 ~ Repr::EthernetIpv4 { .. } => field::TPA(6, 4).end, [INFO] [stdout] 365 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./arp.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | / match self { [INFO] [stdout] 372 | | &Repr::EthernetIpv4 { [INFO] [stdout] 373 | | operation, [INFO] [stdout] 374 | | source_hardware_addr, [INFO] [stdout] ... | [INFO] [stdout] 389 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 390 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 371 ~ match *self { [INFO] [stdout] 372 ~ Repr::EthernetIpv4 { [INFO] [stdout] 373 + operation, [INFO] [stdout] 374 + source_hardware_addr, [INFO] [stdout] 375 + source_protocol_addr, [INFO] [stdout] 376 + target_hardware_addr, [INFO] [stdout] 377 + target_protocol_addr, [INFO] [stdout] 378 ~ } => { [INFO] [stdout] 379 | packet.set_hardware_type(Hardware::Ethernet); [INFO] [stdout] ... [INFO] [stdout] 388 | }, [INFO] [stdout] 389 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./arp.rs:425:9 [INFO] [stdout] | [INFO] [stdout] 425 | / match self { [INFO] [stdout] 426 | | &Repr::EthernetIpv4 { [INFO] [stdout] 427 | | operation, [INFO] [stdout] 428 | | source_hardware_addr, [INFO] [stdout] ... | [INFO] [stdout] 441 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 442 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 425 ~ match *self { [INFO] [stdout] 426 ~ Repr::EthernetIpv4 { [INFO] [stdout] 427 + operation, [INFO] [stdout] 428 + source_hardware_addr, [INFO] [stdout] 429 + source_protocol_addr, [INFO] [stdout] 430 + target_hardware_addr, [INFO] [stdout] 431 + target_protocol_addr, [INFO] [stdout] 432 ~ } => write!( [INFO] [stdout] 433 | f, [INFO] [stdout] ... [INFO] [stdout] 440 | ), [INFO] [stdout] 441 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/./arp.rs:529:32 [INFO] [stdout] | [INFO] [stdout] 529 | let repr = Repr::parse(&packet).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `packet` [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/wire/./arp.rs:537:28 [INFO] [stdout] | [INFO] [stdout] 537 | packet_repr().emit(&mut packet); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `packet` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ip.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | / match self { [INFO] [stdout] 49 | | &Version::Unspecified => write!(f, "IPv?"), [INFO] [stdout] 50 | | &Version::Ipv4 => write!(f, "IPv4"), [INFO] [stdout] 51 | | &Version::Ipv6 => write!(f, "IPv6"), [INFO] [stdout] 52 | | &Version::__Nonexhaustive => unreachable!() [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 48 ~ match *self { [INFO] [stdout] 49 ~ Version::Unspecified => write!(f, "IPv?"), [INFO] [stdout] 50 ~ Version::Ipv4 => write!(f, "IPv4"), [INFO] [stdout] 51 ~ Version::Ipv6 => write!(f, "IPv6"), [INFO] [stdout] 52 ~ Version::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/wire/./ip.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | / pub fn v6( [INFO] [stdout] 117 | | a0: u16, a1: u16, a2: u16, a3: u16, [INFO] [stdout] 118 | | a4: u16, a5: u16, a6: u16, a7: u16, [INFO] [stdout] 119 | | ) -> Address { [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/wire/./ip.rs:236:1 [INFO] [stdout] | [INFO] [stdout] 236 | / impl Default for Address { [INFO] [stdout] 237 | | fn default() -> Address { [INFO] [stdout] 238 | | Address::Unspecified [INFO] [stdout] 239 | | } [INFO] [stdout] 240 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 93 + #[derive(Default)] [INFO] [stdout] 94 | pub enum Address { [INFO] [stdout] 95 | /// An unspecified address. [INFO] [stdout] 96 | /// May be used as a placeholder for storage where the address is not assigned yet. [INFO] [stdout] 97 ~ #[default] [INFO] [stdout] 98 ~ Unspecified, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/wire/./ip.rs:879:44 [INFO] [stdout] | [INFO] [stdout] 879 | match udp::packet::new_checked(payload.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `payload` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/wire/./ip.rs:896:53 [INFO] [stdout] | [INFO] [stdout] 896 | match tcp::Packet::<&[u8]>::new_checked(payload.as_ref(), tcp::Checksum::Ignored) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `payload` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/wire/./ipv4.rs:522:38 [INFO] [stdout] | [INFO] [stdout] 522 | if len < field::DST_ADDR.end { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 523 | | Err(Error::Truncated) [INFO] [stdout] 524 | | } else if len < self.header_len() as usize { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/wire/./ipv4.rs:524:52 [INFO] [stdout] | [INFO] [stdout] 524 | } else if len < self.header_len() as usize { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 525 | | Err(Error::Truncated) [INFO] [stdout] 526 | | } else if self.header_len() as u16 > self.total_len() { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./ipv4.rs:1050:9 [INFO] [stdout] | [INFO] [stdout] 1050 | assert_eq!(packet.more_frags(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1050 - assert_eq!(packet.more_frags(), true); [INFO] [stdout] 1050 + assert!(packet.more_frags()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./ipv4.rs:1051:9 [INFO] [stdout] | [INFO] [stdout] 1051 | assert_eq!(packet.dont_frag(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1051 - assert_eq!(packet.dont_frag(), true); [INFO] [stdout] 1051 + assert!(packet.dont_frag()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./ipv4.rs:1058:9 [INFO] [stdout] | [INFO] [stdout] 1058 | assert_eq!(packet.verify_checksum(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1058 - assert_eq!(packet.verify_checksum(), true); [INFO] [stdout] 1058 + assert!(packet.verify_checksum()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/./ipv4.rs:1131:32 [INFO] [stdout] | [INFO] [stdout] 1131 | let repr = Repr::parse(&packet, Checksum::Manual).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `packet` [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/wire/./ipv4.rs:1157:19 [INFO] [stdout] | [INFO] [stdout] 1157 | repr.emit(&mut packet, Checksum::Manual); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `packet` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/wire/./ipv6.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 79 | / pub fn new( [INFO] [stdout] 80 | | a0: u16, a1: u16, a2: u16, a3: u16, [INFO] [stdout] 81 | | a4: u16, a5: u16, a6: u16, a7: u16, [INFO] [stdout] 82 | | ) -> Address { [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is used to index `data` [INFO] [stdout] --> src/wire/./ipv6.rs:112:25 [INFO] [stdout] | [INFO] [stdout] 112 | for word_idx in 0..8 { [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] 112 - for word_idx in 0..8 { [INFO] [stdout] 112 + for (word_idx, ) in data.iter().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/wire/./ipv6.rs:173:18 [INFO] [stdout] | [INFO] [stdout] 173 | for i in 0..8 { [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] 173 - for i in 0..8 { [INFO] [stdout] 173 + for (i, ) in data.iter_mut().enumerate().take(8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./ipv6.rs:1061:9 [INFO] [stdout] | [INFO] [stdout] 1061 | assert_eq!(false, Address::UNSPECIFIED.is_ipv4_mapped()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1061 - assert_eq!(false, Address::UNSPECIFIED.is_ipv4_mapped()); [INFO] [stdout] 1061 + assert!(!Address::UNSPECIFIED.is_ipv4_mapped()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./ipv6.rs:1062:9 [INFO] [stdout] | [INFO] [stdout] 1062 | assert_eq!(true, Address::from_mapped_ipv4(Ipv4Address::new(192, 168, 1, 1)).is_ipv4_mapped()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1062 - assert_eq!(true, Address::from_mapped_ipv4(Ipv4Address::new(192, 168, 1, 1)).is_ipv4_mapped()); [INFO] [stdout] 1062 + assert!(Address::from_mapped_ipv4(Ipv4Address::new(192, 168, 1, 1)).is_ipv4_mapped()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / match self { [INFO] [stdout] 17 | | &Type::Pad1 => write!(f, "Pad1"), [INFO] [stdout] 18 | | &Type::PadN => write!(f, "PadN"), [INFO] [stdout] 19 | | &Type::Unknown(id) => write!(f, "{}", id) [INFO] [stdout] 20 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 16 ~ match *self { [INFO] [stdout] 17 ~ Type::Pad1 => write!(f, "Pad1"), [INFO] [stdout] 18 ~ Type::PadN => write!(f, "PadN"), [INFO] [stdout] 19 ~ Type::Unknown(id) => write!(f, "{}", id) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6option.rs:190:6 [INFO] [stdout] | [INFO] [stdout] 190 | impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Ipv6Option<&'a mut T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 190 - impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Ipv6Option<&'a mut T> { [INFO] [stdout] 190 + impl + AsMut<[u8]> + ?Sized> Ipv6Option<&mut T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6option.rs:203:6 [INFO] [stdout] | [INFO] [stdout] 203 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Ipv6Option<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 203 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Ipv6Option<&'a T> { [INFO] [stdout] 203 + impl + ?Sized> fmt::Display for Ipv6Option<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | / match self { [INFO] [stdout] 251 | | &Repr::Pad1 => 1, [INFO] [stdout] 252 | | &Repr::PadN(length) => [INFO] [stdout] 253 | | field::DATA(length).end, [INFO] [stdout] ... | [INFO] [stdout] 257 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 258 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 250 ~ match *self { [INFO] [stdout] 251 ~ Repr::Pad1 => 1, [INFO] [stdout] 252 ~ Repr::PadN(length) => [INFO] [stdout] 253 | field::DATA(length).end, [INFO] [stdout] 254 ~ Repr::Unknown{ length, .. } => [INFO] [stdout] 255 | field::DATA(length).end, [INFO] [stdout] 256 | [INFO] [stdout] 257 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:263:9 [INFO] [stdout] | [INFO] [stdout] 263 | / match self { [INFO] [stdout] 264 | | &Repr::Pad1 => [INFO] [stdout] 265 | | opt.set_option_type(Type::Pad1), [INFO] [stdout] 266 | | &Repr::PadN(len) => { [INFO] [stdout] ... | [INFO] [stdout] 280 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 281 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 263 ~ match *self { [INFO] [stdout] 264 ~ Repr::Pad1 => [INFO] [stdout] 265 | opt.set_option_type(Type::Pad1), [INFO] [stdout] 266 ~ Repr::PadN(len) => { [INFO] [stdout] 267 | opt.set_option_type(Type::PadN); [INFO] [stdout] ... [INFO] [stdout] 273 | } [INFO] [stdout] 274 ~ Repr::Unknown{ type_, length, data } => { [INFO] [stdout] 275 | opt.set_option_type(type_); [INFO] [stdout] ... [INFO] [stdout] 279 | [INFO] [stdout] 280 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6option.rs:354:9 [INFO] [stdout] | [INFO] [stdout] 354 | / match self { [INFO] [stdout] 355 | | &Repr::Pad1 => [INFO] [stdout] 356 | | write!(f, "{} ", Type::Pad1), [INFO] [stdout] 357 | | &Repr::PadN(len) => [INFO] [stdout] ... | [INFO] [stdout] 362 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 363 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 354 ~ match *self { [INFO] [stdout] 355 ~ Repr::Pad1 => [INFO] [stdout] 356 | write!(f, "{} ", Type::Pad1), [INFO] [stdout] 357 ~ Repr::PadN(len) => [INFO] [stdout] 358 | write!(f, "{} length={} ", Type::PadN, len), [INFO] [stdout] 359 ~ Repr::Unknown{ type_, length, .. } => [INFO] [stdout] 360 | write!(f, "{} length={} ", type_, length), [INFO] [stdout] 361 | [INFO] [stdout] 362 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6hopbyhop.rs:136:6 [INFO] [stdout] | [INFO] [stdout] 136 | impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Header<&'a mut T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 136 - impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Header<&'a mut T> { [INFO] [stdout] 136 + impl + AsMut<[u8]> + ?Sized> Header<&mut T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6hopbyhop.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 146 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] 146 + impl + ?Sized> fmt::Display for Header<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/wire/./ipv6fragment.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | data[3] = data[3] & 0xf9; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data[3] &= 0xf9` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6fragment.rs:146:6 [INFO] [stdout] | [INFO] [stdout] 146 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 146 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] 146 + impl + ?Sized> fmt::Display for Header<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/wire/./ipv6fragment.rs:200:6 [INFO] [stdout] | [INFO] [stdout] 200 | impl<'a> fmt::Display for Repr { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./ipv6fragment.rs:234:9 [INFO] [stdout] | [INFO] [stdout] 234 | assert_eq!(header.more_frags(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 234 - assert_eq!(header.more_frags(), true); [INFO] [stdout] 234 + assert!(header.more_frags()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./ipv6fragment.rs:240:9 [INFO] [stdout] | [INFO] [stdout] 240 | assert_eq!(header.more_frags(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 240 - assert_eq!(header.more_frags(), false); [INFO] [stdout] 240 + assert!(!header.more_frags()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/wire/./ipv6routing.rs:312:17 [INFO] [stdout] | [INFO] [stdout] 312 | data[field::PAD] = data[field::PAD] & 0xF0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data[field::PAD] &= 0xF0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./ipv6routing.rs:377:6 [INFO] [stdout] | [INFO] [stdout] 377 | impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 377 - impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> { [INFO] [stdout] 377 + impl + ?Sized> fmt::Display for Header<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6routing.rs:467:9 [INFO] [stdout] | [INFO] [stdout] 467 | / match self { [INFO] [stdout] 468 | | &Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 469 | | header.set_next_header(next_header); [INFO] [stdout] 470 | | header.set_header_len(length); [INFO] [stdout] ... | [INFO] [stdout] 488 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 489 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 467 ~ match *self { [INFO] [stdout] 468 ~ Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 469 | header.set_next_header(next_header); [INFO] [stdout] ... [INFO] [stdout] 475 | } [INFO] [stdout] 476 ~ Repr::Rpl { next_header, length, segments_left, cmpr_i, cmpr_e, pad, addresses } => { [INFO] [stdout] 477 | header.set_next_header(next_header); [INFO] [stdout] ... [INFO] [stdout] 487 | [INFO] [stdout] 488 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./ipv6routing.rs:495:9 [INFO] [stdout] | [INFO] [stdout] 495 | / match self { [INFO] [stdout] 496 | | &Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 497 | | write!(f, "IPv6 Routing next_hdr={} length={} type={} seg_left={} home_address={}", [INFO] [stdout] 498 | | next_header, length, Type::Type2, segments_left, home_address) [INFO] [stdout] ... | [INFO] [stdout] 505 | | &Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] 506 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 495 ~ match *self { [INFO] [stdout] 496 ~ Repr::Type2 { next_header, length, segments_left, home_address } => { [INFO] [stdout] 497 | write!(f, "IPv6 Routing next_hdr={} length={} type={} seg_left={} home_address={}", [INFO] [stdout] 498 | next_header, length, Type::Type2, segments_left, home_address) [INFO] [stdout] 499 | } [INFO] [stdout] 500 ~ Repr::Rpl { next_header, length, segments_left, cmpr_i, cmpr_e, pad, .. } => { [INFO] [stdout] 501 | write!(f, "IPv6 Routing next_hdr={} length={} type={} seg_left={} cmpr_i={} cmpr_e={} pad={}", [INFO] [stdout] ... [INFO] [stdout] 504 | [INFO] [stdout] 505 ~ Repr::__Nonexhaustive => unreachable!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./icmpv4.rs:541:9 [INFO] [stdout] | [INFO] [stdout] 541 | / match self { [INFO] [stdout] 542 | | &Repr::EchoRequest { ident, seq_no, payload: _ } => { [INFO] [stdout] 543 | | packet.set_msg_type(Message::EchoRequest); [INFO] [stdout] 544 | | packet.set_msg_code(0); [INFO] [stdout] ... | [INFO] [stdout] 564 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 565 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 541 ~ match *self { [INFO] [stdout] 542 ~ Repr::EchoRequest { ident, seq_no, payload: _ } => { [INFO] [stdout] 543 | packet.set_msg_type(Message::EchoRequest); [INFO] [stdout] ... [INFO] [stdout] 548 | [INFO] [stdout] 549 ~ Repr::EchoReply { ident, seq_no, payload: _ } => { [INFO] [stdout] 550 | packet.set_msg_type(Message::EchoReply); [INFO] [stdout] ... [INFO] [stdout] 555 | [INFO] [stdout] 556 ~ Repr::DstUnreachable { reason, header, } => { [INFO] [stdout] 557 | packet.set_msg_type(Message::DstUnreachable); [INFO] [stdout] ... [INFO] [stdout] 563 | [INFO] [stdout] 564 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/./icmpv4.rs:579:27 [INFO] [stdout] | [INFO] [stdout] 579 | match Repr::parse(&self, Checksum::Manual) { [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/wire/./icmpv4.rs:596:9 [INFO] [stdout] | [INFO] [stdout] 596 | / match self { [INFO] [stdout] 597 | | &Repr::EchoRequest { ident, seq_no, payload } => [INFO] [stdout] 598 | | write!(f, "ICMPv4 echo request id={} seq={} len={}", [INFO] [stdout] 599 | | ident, seq_no, payload), [INFO] [stdout] ... | [INFO] [stdout] 606 | | &Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] 607 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 596 ~ match *self { [INFO] [stdout] 597 ~ Repr::EchoRequest { ident, seq_no, payload } => [INFO] [stdout] 598 | write!(f, "ICMPv4 echo request id={} seq={} len={}", [INFO] [stdout] 599 | ident, seq_no, payload), [INFO] [stdout] 600 ~ Repr::EchoReply { ident, seq_no, payload } => [INFO] [stdout] 601 | write!(f, "ICMPv4 echo reply id={} seq={} len={}", [INFO] [stdout] 602 | ident, seq_no, payload), [INFO] [stdout] 603 ~ Repr::DstUnreachable { reason, .. } => [INFO] [stdout] 604 | write!(f, "ICMPv4 destination unreachable ({})", [INFO] [stdout] 605 | reason), [INFO] [stdout] 606 ~ Repr::__Nonexhaustive => unreachable!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./icmpv4.rs:657:9 [INFO] [stdout] | [INFO] [stdout] 657 | assert_eq!(packet.verify_checksum(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 657 - assert_eq!(packet.verify_checksum(), true); [INFO] [stdout] 657 + assert!(packet.verify_checksum()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wire/./icmpv4.rs:684:32 [INFO] [stdout] | [INFO] [stdout] 684 | let repr = Repr::parse(&packet, Checksum::Manual).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `packet` [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/wire/./icmpv4.rs:693:19 [INFO] [stdout] | [INFO] [stdout] 693 | repr.emit(&mut packet, Checksum::Manual); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `packet` [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: struct `udp` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/wire/./udp.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn len(&self) -> u16 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/wire/./tcp.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use core::{i32, ops, cmp, fmt}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:243:15 [INFO] [stdout] | [INFO] [stdout] 243 | while options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/wire/./tcp.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / match option { [INFO] [stdout] 246 | | TcpOption::SackPermitted => { [INFO] [stdout] 247 | | return Ok(true); [INFO] [stdout] 248 | | }, [INFO] [stdout] 249 | | _ => {}, [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 245 ~ if option == TcpOption::SackPermitted { [INFO] [stdout] 246 + return Ok(true); [INFO] [stdout] 247 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 's [INFO] [stdout] --> src/wire/./tcp.rs:259:33 [INFO] [stdout] | [INFO] [stdout] 259 | pub fn selective_ack_ranges<'s>( [INFO] [stdout] | ^^ [INFO] [stdout] 260 | &'s self [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 259 ~ pub fn selective_ack_ranges( [INFO] [stdout] 260 ~ &self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:264:15 [INFO] [stdout] | [INFO] [stdout] 264 | while options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/wire/./tcp.rs:266:13 [INFO] [stdout] | [INFO] [stdout] 266 | / match option { [INFO] [stdout] 267 | | TcpOption::SackRange(slice) => { [INFO] [stdout] 268 | | return Ok(slice); [INFO] [stdout] 269 | | }, [INFO] [stdout] 270 | | _ => {}, [INFO] [stdout] 271 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 266 ~ if let TcpOption::SackRange(slice) = option { [INFO] [stdout] 267 + return Ok(slice); [INFO] [stdout] 268 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `NetworkEndian::read_u16` doesn't need a mutable reference [INFO] [stdout] --> src/wire/./tcp.rs:365:45 [INFO] [stdout] | [INFO] [stdout] 365 | let field = NetworkEndian::read_u16(&mut data[field::FLAGS]) & !0xfff; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 365 - let field = NetworkEndian::read_u16(&mut data[field::FLAGS]) & !0xfff; [INFO] [stdout] 365 + let field = NetworkEndian::read_u16(&data[field::FLAGS]) & !0xfff; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `buffer.get(0)` [INFO] [stdout] --> src/wire/./tcp.rs:639:16 [INFO] [stdout] | [INFO] [stdout] 639 | match *buffer.get(0).ok_or(Error::Truncated)? { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `buffer.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:888:15 [INFO] [stdout] | [INFO] [stdout] 888 | while options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/wire/./tcp.rs:952:12 [INFO] [stdout] | [INFO] [stdout] 952 | if length % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `!length.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/wire/./tcp.rs:968:9 [INFO] [stdout] | [INFO] [stdout] 968 | usize::from(self.header_len()) + usize::from(self.payload_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `usize::from()`: `self.header_len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wire/./tcp.rs:998:16 [INFO] [stdout] | [INFO] [stdout] 998 | if options.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!options.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/wire/./tcp.rs:1018:6 [INFO] [stdout] | [INFO] [stdout] 1018 | impl<'a, T: Payload + ?Sized> fmt::Display for Packet<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1018 - impl<'a, T: Payload + ?Sized> fmt::Display for Packet<&'a T> { [INFO] [stdout] 1018 + impl fmt::Display for Packet<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./tcp.rs:1148:9 [INFO] [stdout] | [INFO] [stdout] 1148 | assert_eq!(packet.flags().fin(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1148 - assert_eq!(packet.flags().fin(), true); [INFO] [stdout] 1148 + assert!(packet.flags().fin()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./tcp.rs:1149:9 [INFO] [stdout] | [INFO] [stdout] 1149 | assert_eq!(packet.flags().syn(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1149 - assert_eq!(packet.flags().syn(), false); [INFO] [stdout] 1149 + assert!(!packet.flags().syn()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./tcp.rs:1150:9 [INFO] [stdout] | [INFO] [stdout] 1150 | assert_eq!(packet.flags().rst(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1150 - assert_eq!(packet.flags().rst(), true); [INFO] [stdout] 1150 + assert!(packet.flags().rst()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./tcp.rs:1151:9 [INFO] [stdout] | [INFO] [stdout] 1151 | assert_eq!(packet.flags().psh(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1151 - assert_eq!(packet.flags().psh(), false); [INFO] [stdout] 1151 + assert!(!packet.flags().psh()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./tcp.rs:1152:9 [INFO] [stdout] | [INFO] [stdout] 1152 | assert_eq!(packet.flags().ack(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1152 - assert_eq!(packet.flags().ack(), true); [INFO] [stdout] 1152 + assert!(packet.flags().ack()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./tcp.rs:1153:9 [INFO] [stdout] | [INFO] [stdout] 1153 | assert_eq!(packet.flags().urg(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1153 - assert_eq!(packet.flags().urg(), true); [INFO] [stdout] 1153 + assert!(packet.flags().urg()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/wire/./tcp.rs:1159:9 [INFO] [stdout] | [INFO] [stdout] 1159 | assert_eq!(packet.verify_checksum(SRC_ADDR.into(), DST_ADDR.into()), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 1159 - assert_eq!(packet.verify_checksum(SRC_ADDR.into(), DST_ADDR.into()), true); [INFO] [stdout] 1159 + assert!(packet.verify_checksum(SRC_ADDR.into(), DST_ADDR.into())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/wire/payload.rs:302:13 [INFO] [stdout] | [INFO] [stdout] 302 | Ok(self.resize(length, 0u8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 302 ~ self.resize(length, 0u8); [INFO] [stdout] 303 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./arp.rs:315:1 [INFO] [stdout] | [INFO] [stdout] 315 | / pub enum Repr { [INFO] [stdout] 316 | | /// An Ethernet and IPv4 Address Resolution Protocol packet. [INFO] [stdout] 317 | | EthernetIpv4 { [INFO] [stdout] 318 | | operation: Operation, [INFO] [stdout] ... | [INFO] [stdout] 325 | | __Nonexhaustive, [INFO] [stdout] 326 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./arp.rs:325:5 [INFO] [stdout] | [INFO] [stdout] 325 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] = note: `#[warn(clippy::manual_non_exhaustive)]` on by default [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 315 + #[non_exhaustive] [INFO] [stdout] 316 | pub enum Repr { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / pub enum Version { [INFO] [stdout] 25 | | Unspecified, [INFO] [stdout] 26 | | Ipv4, [INFO] [stdout] 27 | | Ipv6, [INFO] [stdout] 28 | | #[doc(hidden)] [INFO] [stdout] 29 | | __Nonexhaustive, [INFO] [stdout] 30 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 24 + #[non_exhaustive] [INFO] [stdout] 25 | pub enum Version { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:93:1 [INFO] [stdout] | [INFO] [stdout] 93 | / pub enum Address { [INFO] [stdout] 94 | | /// An unspecified address. [INFO] [stdout] 95 | | /// May be used as a placeholder for storage where the address is not assigned yet. [INFO] [stdout] 96 | | Unspecified, [INFO] [stdout] ... | [INFO] [stdout] 105 | | __Nonexhaustive [INFO] [stdout] 106 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 93 + #[non_exhaustive] [INFO] [stdout] 94 | pub enum Address { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:268:1 [INFO] [stdout] | [INFO] [stdout] 268 | / pub enum Cidr { [INFO] [stdout] 269 | | Ipv4(Ipv4Cidr), [INFO] [stdout] 270 | | Ipv6(Ipv6Cidr), [INFO] [stdout] 271 | | #[doc(hidden)] [INFO] [stdout] 272 | | __Nonexhaustive, [INFO] [stdout] 273 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 272 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 268 + #[non_exhaustive] [INFO] [stdout] 269 | pub enum Cidr { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ip.rs:278:1 [INFO] [stdout] | [INFO] [stdout] 278 | / pub enum Subnet { [INFO] [stdout] 279 | | Ipv4(Ipv4Subnet), [INFO] [stdout] 280 | | Ipv6(Ipv6Subnet), [INFO] [stdout] 281 | | #[doc(hidden)] [INFO] [stdout] 282 | | __Nonexhaustive, [INFO] [stdout] 283 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ip.rs:282:5 [INFO] [stdout] | [INFO] [stdout] 282 | __Nonexhaustive, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 278 + #[non_exhaustive] [INFO] [stdout] 279 | pub enum Subnet { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ipv6option.rs:217:1 [INFO] [stdout] | [INFO] [stdout] 217 | / pub enum Repr<'a> { [INFO] [stdout] 218 | | Pad1, [INFO] [stdout] 219 | | PadN(u8), [INFO] [stdout] 220 | | Unknown { [INFO] [stdout] ... | [INFO] [stdout] 227 | | __Nonexhaustive [INFO] [stdout] 228 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ipv6option.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 217 + #[non_exhaustive] [INFO] [stdout] 218 | pub enum Repr<'a> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./ipv6routing.rs:391:1 [INFO] [stdout] | [INFO] [stdout] 391 | / pub enum Repr<'a> { [INFO] [stdout] 392 | | Type2 { [INFO] [stdout] 393 | | /// The type of header immediately following the Routing header. [INFO] [stdout] 394 | | next_header: Protocol, [INFO] [stdout] ... | [INFO] [stdout] 421 | | __Nonexhaustive [INFO] [stdout] 422 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./ipv6routing.rs:421:5 [INFO] [stdout] | [INFO] [stdout] 421 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 391 + #[non_exhaustive] [INFO] [stdout] 392 | pub enum Repr<'a> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this seems like a manual implementation of the non-exhaustive pattern [INFO] [stdout] --> src/wire/./icmpv4.rs:441:1 [INFO] [stdout] | [INFO] [stdout] 441 | / pub enum Repr { [INFO] [stdout] 442 | | EchoRequest { [INFO] [stdout] 443 | | ident: u16, [INFO] [stdout] 444 | | seq_no: u16, [INFO] [stdout] ... | [INFO] [stdout] 457 | | __Nonexhaustive [INFO] [stdout] 458 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] help: remove this variant [INFO] [stdout] --> src/wire/./icmpv4.rs:457:5 [INFO] [stdout] | [INFO] [stdout] 457 | __Nonexhaustive [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive [INFO] [stdout] help: use the `#[non_exhaustive]` attribute instead [INFO] [stdout] | [INFO] [stdout] 441 + #[non_exhaustive] [INFO] [stdout] 442 | pub enum Repr { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wire/./ipv6.rs:1284:25 [INFO] [stdout] | [INFO] [stdout] 1284 | let mut bytes = vec![0; 40]; [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `[0; 40]` [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/wire/./ipv6.rs:1294:25 [INFO] [stdout] | [INFO] [stdout] 1294 | let mut bytes = vec![0; 40]; [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `[0; 40]` [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/wire/./ipv6.rs:1304:25 [INFO] [stdout] | [INFO] [stdout] 1304 | let mut bytes = vec![0; 40]; [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `[0; 40]` [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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/nic/loopback.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | fn next_recv(&mut self) -> Option<(AckRecv, &mut C)> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^ ^^^^^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is hidden here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 51 | fn next_recv(&mut self) -> Option<(AckRecv<'_>, &mut C)> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/nic/loopback.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | fn next_send(&mut self) -> Option<(AckSend, &mut C)> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^ ^^^^^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is hidden here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 62 | fn next_send(&mut self) -> Option<(AckSend<'_>, &mut C)> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/arp/neighbor.rs:311:20 [INFO] [stdout] | [INFO] [stdout] 311 | pub fn missing(&self) -> Missing { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 311 | pub fn missing(&self) -> Missing<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/arp/packet.rs:64:23 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 64 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/eth/packet.rs:78:23 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 78 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:104:19 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn answer(&mut self) -> Receiver { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 104 | pub fn answer(&mut self) -> Receiver<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:109:20 [INFO] [stdout] | [INFO] [stdout] 109 | pub fn recv(&mut self, handler: H) -> Receiver { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 109 | pub fn recv(&mut self, handler: H) -> Receiver<'_, H> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:114:25 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn recv_with(&mut self, handler: H) -> Receiver> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 114 | pub fn recv_with(&mut self, handler: H) -> Receiver<'_, FnHandler> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:119:20 [INFO] [stdout] | [INFO] [stdout] 119 | pub fn send(&mut self, handler: H) -> Sender { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 119 | pub fn send(&mut self, handler: H) -> Sender<'_, H> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | pub fn send_with(&mut self, handler: H) -> Sender> { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 124 | pub fn send_with(&mut self, handler: H) -> Sender<'_, FnHandler> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/endpoint.rs:130:16 [INFO] [stdout] | [INFO] [stdout] 130 | fn get_mut(&mut self) -> EndpointRef { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 130 | fn get_mut(&mut self) -> EndpointRef<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/icmp/packet.rs:80:23 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 80 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/ip/packet.rs:130:23 [INFO] [stdout] | [INFO] [stdout] 130 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 130 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing documentation for a method [INFO] [stdout] --> src/layer/ip/packet.rs:267:5 [INFO] [stdout] | [INFO] [stdout] 267 | pub fn control(&self) -> &Controller<'a> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | #![warn(missing_docs)] [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/loss/mod.rs:77:21 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn lossy(&mut self, layer: I) -> Lossy { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 77 | pub fn lossy(&mut self, layer: I) -> Lossy<'_, I> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/udp/packet.rs:86:23 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn borrow_mut(&mut self) -> Controller { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 86 | pub fn borrow_mut(&mut self) -> Controller<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/connection.rs:362:14 [INFO] [stdout] | [INFO] [stdout] 362 | fn entry(&mut self, index: SlotKey) -> Option; [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 362 | fn entry(&mut self, index: SlotKey) -> Option>; [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/connection.rs:366:19 [INFO] [stdout] | [INFO] [stdout] 366 | fn find_tuple(&mut self, tuple: FourTuple) -> Option; [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 366 | fn find_tuple(&mut self, tuple: FourTuple) -> Option>; [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/connection.rs:1325:14 [INFO] [stdout] | [INFO] [stdout] 1325 | fn entry(&mut self) -> Entry { [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1325 | fn entry(&mut self) -> Entry<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:163:25 [INFO] [stdout] | [INFO] [stdout] 163 | pub(crate) fn entry(&mut self, index: SlotKey) [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 164 | -> Option [INFO] [stdout] | ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 164 | -> Option> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:185:36 [INFO] [stdout] | [INFO] [stdout] 185 | pub(crate) fn entry_from_tuple(&mut self, tuple: FourTuple) [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here [INFO] [stdout] 186 | -> Option [INFO] [stdout] | ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 186 | -> Option> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:440:14 [INFO] [stdout] | [INFO] [stdout] 440 | fn entry(&mut self, index: SlotKey) -> Option { [INFO] [stdout] | ^^^^^^^^^ ^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 440 | fn entry(&mut self, index: SlotKey) -> Option> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/endpoint.rs:444:19 [INFO] [stdout] | [INFO] [stdout] 444 | fn find_tuple(&mut self, tuple: FourTuple) -> Option { [INFO] [stdout] | ^^^^^^^^^ the lifetime is elided here ^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 444 | fn find_tuple(&mut self, tuple: FourTuple) -> Option> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/layer/tcp/siphash.rs:238:18 [INFO] [stdout] | [INFO] [stdout] 238 | fn debug(&self) -> DebugState { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 238 | fn debug(&self) -> DebugState<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/wire/./ipv6hopbyhop.rs:193:20 [INFO] [stdout] | [INFO] [stdout] 193 | pub fn options(&self) -> Ipv6OptionsIterator { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 193 | pub fn options(&self) -> Ipv6OptionsIterator<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `std::mem::replace` that must be used [INFO] [stdout] --> src/wire/payload.rs:276:9 [INFO] [stdout] | [INFO] [stdout] 276 | core::mem::replace(self, inner); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: if you don't need the old value, you can just assign the new value directly [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 276 | let _ = core::mem::replace(self, inner); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.58s [INFO] running `Command { std: "docker" "inspect" "9b00c4e2a8ac693dc53f0e0cda4984ba1aee14eeecb44a17f7e093ba99b7308c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9b00c4e2a8ac693dc53f0e0cda4984ba1aee14eeecb44a17f7e093ba99b7308c", kill_on_drop: false }` [INFO] [stdout] 9b00c4e2a8ac693dc53f0e0cda4984ba1aee14eeecb44a17f7e093ba99b7308c