[INFO] cloning repository https://github.com/darvoiteau/rndiag [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/darvoiteau/rndiag" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdarvoiteau%2Frndiag", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdarvoiteau%2Frndiag'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3ded69bd99780608e1888e0b70397a58888e7e11 [INFO] linting darvoiteau/rndiag against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdarvoiteau%2Frndiag" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/darvoiteau/rndiag [INFO] finished tweaking git repo https://github.com/darvoiteau/rndiag [INFO] tweaked toml for git repo https://github.com/darvoiteau/rndiag written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/darvoiteau/rndiag on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/darvoiteau/rndiag already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded ping v0.6.1 [INFO] [stderr] Downloaded dns-lookup v3.0.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 247b7da24fd4a89984be5b135c932523c92922817c9c9bde155a705c04917725 [INFO] running `Command { std: "docker" "start" "-a" "247b7da24fd4a89984be5b135c932523c92922817c9c9bde155a705c04917725", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "247b7da24fd4a89984be5b135c932523c92922817c9c9bde155a705c04917725", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "247b7da24fd4a89984be5b135c932523c92922817c9c9bde155a705c04917725", kill_on_drop: false }` [INFO] [stdout] 247b7da24fd4a89984be5b135c932523c92922817c9c9bde155a705c04917725 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 23df23f71a8161b9bb1d253f0f6bf91ddb07fb723ee2c0cde035b374909fe7ee [INFO] running `Command { std: "docker" "start" "-a" "23df23f71a8161b9bb1d253f0f6bf91ddb07fb723ee2c0cde035b374909fe7ee", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Compiling zerocopy v0.8.33 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Compiling memchr v2.7.6 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Compiling regex-syntax v0.8.8 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking no-std-net v0.6.0 [INFO] [stderr] Checking pnet_base v0.34.0 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Compiling aho-corasick v1.1.4 [INFO] [stderr] Checking rustix v0.38.44 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking pnet_macros_support v0.34.0 [INFO] [stderr] Checking pnet_sys v0.34.0 [INFO] [stderr] Compiling pnet v0.34.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking dns-lookup v3.0.1 [INFO] [stderr] Compiling zmij v1.0.16 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling multer v2.1.0 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Compiling regex-automata v0.4.13 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking headers-core v0.2.0 [INFO] [stderr] Checking csv v1.4.0 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking headers v0.3.9 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking scoped-tls v1.0.1 [INFO] [stderr] Compiling argh_shared v0.1.13 [INFO] [stderr] Checking clap_builder v4.5.54 [INFO] [stderr] Checking rust-fuzzy-search v0.1.1 [INFO] [stderr] Compiling regex v1.12.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.23.0 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling derive_more-impl v2.1.1 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking derive_more v2.1.1 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Compiling pnet_macros v0.34.0 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking ping v0.6.1 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling argh_derive v0.1.13 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Compiling darling_macro v0.23.0 [INFO] [stderr] Compiling darling v0.23.0 [INFO] [stderr] Compiling instability v0.3.11 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking pnet_packet v0.34.0 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking ratatui v0.29.0 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking ipnetwork v0.20.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking argh v0.1.13 [INFO] [stderr] Checking pnet_datalink v0.34.0 [INFO] [stderr] Checking tungstenite v0.21.0 [INFO] [stderr] Checking pnet_transport v0.34.0 [INFO] [stderr] Checking rndiag-graph v0.1.0 (/opt/rustwide/workdir/rndiag-graph) [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking tokio-tungstenite v0.21.0 [INFO] [stdout] warning: the loop variable `row` is used to index `lines` [INFO] [stdout] --> rndiag-graph/src/graph.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | for row in 0..graph_height as usize { [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] 120 - for row in 0..graph_height as usize { [INFO] [stdout] 120 + for (row, ) in lines.iter_mut().enumerate().take(graph_height as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-graph/src/graph.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | / if event::poll(Duration::from_millis(500))? { [INFO] [stdout] 173 | | if let Event::Key(key) = event::read()? { [INFO] [stdout] 174 | | //Change view depending of the pressed key or quit the graph [INFO] [stdout] 175 | | match key.code { [INFO] [stdout] ... | [INFO] [stdout] 183 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 172 ~ if event::poll(Duration::from_millis(500))? [INFO] [stdout] 173 ~ && let Event::Key(key) = event::read()? { [INFO] [stdout] 174 | //Change view depending of the pressed key or quit the graph [INFO] [stdout] ... [INFO] [stdout] 181 | } [INFO] [stdout] 182 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `lines` [INFO] [stdout] --> rndiag-graph/src/graph.rs:120:24 [INFO] [stdout] | [INFO] [stdout] 120 | for row in 0..graph_height as usize { [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] 120 - for row in 0..graph_height as usize { [INFO] [stdout] 120 + for (row, ) in lines.iter_mut().enumerate().take(graph_height as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-graph/src/graph.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | / if event::poll(Duration::from_millis(500))? { [INFO] [stdout] 173 | | if let Event::Key(key) = event::read()? { [INFO] [stdout] 174 | | //Change view depending of the pressed key or quit the graph [INFO] [stdout] 175 | | match key.code { [INFO] [stdout] ... | [INFO] [stdout] 183 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 172 ~ if event::poll(Duration::from_millis(500))? [INFO] [stdout] 173 ~ && let Event::Key(key) = event::read()? { [INFO] [stdout] 174 | //Change view depending of the pressed key or quit the graph [INFO] [stdout] ... [INFO] [stdout] 181 | } [INFO] [stdout] 182 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking rndiag-core v0.1.0 (/opt/rustwide/workdir/rndiag-core) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> rndiag-core/src/speedtest.rs:220:13 [INFO] [stdout] | [INFO] [stdout] 220 | srv_port: srv_port, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `srv_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] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> rndiag-core/src/speedtest.rs:221:13 [INFO] [stdout] | [INFO] [stdout] 221 | is_srv: is_srv, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `is_srv` [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] --> rndiag-core/src/speedtest.rs:222:13 [INFO] [stdout] | [INFO] [stdout] 222 | tst_duration: tst_duration, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `tst_duration` [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] --> rndiag-core/src/speedtest.rs:223:13 [INFO] [stdout] | [INFO] [stdout] 223 | mbps: mbps, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mbps` [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] --> rndiag-core/src/tcp_ping.rs:547:13 [INFO] [stdout] | [INFO] [stdout] 547 | 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] --> rndiag-core/src/tcp_ping.rs:560:13 [INFO] [stdout] | [INFO] [stdout] 560 | flag: flag, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `flag` [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] --> rndiag-core/src/speedtest.rs:220:13 [INFO] [stdout] | [INFO] [stdout] 220 | srv_port: srv_port, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `srv_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] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> rndiag-core/src/speedtest.rs:221:13 [INFO] [stdout] | [INFO] [stdout] 221 | is_srv: is_srv, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `is_srv` [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] --> rndiag-core/src/speedtest.rs:222:13 [INFO] [stdout] | [INFO] [stdout] 222 | tst_duration: tst_duration, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `tst_duration` [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] --> rndiag-core/src/speedtest.rs:223:13 [INFO] [stdout] | [INFO] [stdout] 223 | mbps: mbps, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `mbps` [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] --> rndiag-core/src/tcp_ping.rs:547:13 [INFO] [stdout] | [INFO] [stdout] 547 | 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] --> rndiag-core/src/tcp_ping.rs:560:13 [INFO] [stdout] | [INFO] [stdout] 560 | flag: flag, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `flag` [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] [stderr] Checking h2 v0.3.27 [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:42:35 [INFO] [stdout] | [INFO] [stdout] 42 | let moy_latency = sum_latency as u16 / vec_size as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sum_latency` [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: the variable `n` is used as a loop counter [INFO] [stdout] --> rndiag-core/src/tool.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | for elem in &self.data()[vec_size-scale as usize..]{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (n, elem) in self.data()[vec_size-scale as usize..].iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:115:40 [INFO] [stdout] | [INFO] [stdout] 115 | let moy_latency: u16 = sum_latency as u16 / k as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sum_latency` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:184:42 [INFO] [stdout] | [INFO] [stdout] 184 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:252:47 [INFO] [stdout] | [INFO] [stdout] 252 | let moy_latency_sample = sum_latency_sample as u16 / 15 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:252:75 [INFO] [stdout] | [INFO] [stdout] 252 | let moy_latency_sample = sum_latency_sample as u16 / 15 as u16; [INFO] [stdout] | ^^^^^^^^^ help: try: `15_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:266:42 [INFO] [stdout] | [INFO] [stdout] 266 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:318:47 [INFO] [stdout] | [INFO] [stdout] 318 | let moy_latency_sample = sum_latency_sample as u16 / 30 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:318:75 [INFO] [stdout] | [INFO] [stdout] 318 | let moy_latency_sample = sum_latency_sample as u16 / 30 as u16; [INFO] [stdout] | ^^^^^^^^^ help: try: `30_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:331:42 [INFO] [stdout] | [INFO] [stdout] 331 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:382:47 [INFO] [stdout] | [INFO] [stdout] 382 | let moy_latency_sample = sum_latency_sample as u16 / 60 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:382:75 [INFO] [stdout] | [INFO] [stdout] 382 | let moy_latency_sample = sum_latency_sample as u16 / 60 as u16; [INFO] [stdout] | ^^^^^^^^^ help: try: `60_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:395:42 [INFO] [stdout] | [INFO] [stdout] 395 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:449:47 [INFO] [stdout] | [INFO] [stdout] 449 | let moy_latency_sample = sum_latency_sample as u16 / 120 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:449:75 [INFO] [stdout] | [INFO] [stdout] 449 | let moy_latency_sample = sum_latency_sample as u16 / 120 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `120_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:462:42 [INFO] [stdout] | [INFO] [stdout] 462 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:514:47 [INFO] [stdout] | [INFO] [stdout] 514 | let moy_latency_sample = sum_latency_sample as u16 / 240 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:514:75 [INFO] [stdout] | [INFO] [stdout] 514 | let moy_latency_sample = sum_latency_sample as u16 / 240 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `240_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:527:42 [INFO] [stdout] | [INFO] [stdout] 527 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:579:47 [INFO] [stdout] | [INFO] [stdout] 579 | let moy_latency_sample = sum_latency_sample as u16 / 480 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:579:75 [INFO] [stdout] | [INFO] [stdout] 579 | let moy_latency_sample = sum_latency_sample as u16 / 480 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `480_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:593:42 [INFO] [stdout] | [INFO] [stdout] 593 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:645:47 [INFO] [stdout] | [INFO] [stdout] 645 | let moy_latency_sample = sum_latency_sample as u16 / 960 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:645:75 [INFO] [stdout] | [INFO] [stdout] 645 | let moy_latency_sample = sum_latency_sample as u16 / 960 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `960_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:658:42 [INFO] [stdout] | [INFO] [stdout] 658 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:710:47 [INFO] [stdout] | [INFO] [stdout] 710 | let moy_latency_sample = sum_latency_sample as u16 / 1920 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:710:75 [INFO] [stdout] | [INFO] [stdout] 710 | let moy_latency_sample = sum_latency_sample as u16 / 1920 as u16; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `1920_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:722:42 [INFO] [stdout] | [INFO] [stdout] 722 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:772:47 [INFO] [stdout] | [INFO] [stdout] 772 | let moy_latency_sample = sum_latency_sample as u16 / 3840 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:772:75 [INFO] [stdout] | [INFO] [stdout] 772 | let moy_latency_sample = sum_latency_sample as u16 / 3840 as u16; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `3840_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:785:42 [INFO] [stdout] | [INFO] [stdout] 785 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:836:47 [INFO] [stdout] | [INFO] [stdout] 836 | let moy_latency_sample = sum_latency_sample as u16 / 7680 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:836:75 [INFO] [stdout] | [INFO] [stdout] 836 | let moy_latency_sample = sum_latency_sample as u16 / 7680 as u16; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `7680_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:849:42 [INFO] [stdout] | [INFO] [stdout] 849 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:901:47 [INFO] [stdout] | [INFO] [stdout] 901 | let moy_latency_sample = sum_latency_sample as u16 / 15360 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:901:75 [INFO] [stdout] | [INFO] [stdout] 901 | let moy_latency_sample = sum_latency_sample as u16 / 15360 as u16; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `15360_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:914:42 [INFO] [stdout] | [INFO] [stdout] 914 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> rndiag-core/src/tool.rs:933:40 [INFO] [stdout] | [INFO] [stdout] 933 | let file_export = File::create(&self.output()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.output()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> rndiag-core/src/tool.rs:948:45 [INFO] [stdout] | [INFO] [stdout] 948 | if let Err(e) = writer.write_record(&["Date", "Ping Number", "Latency"]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["Date", "Ping Number", "Latency"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> rndiag-core/src/tool.rs:973:9 [INFO] [stdout] | [INFO] [stdout] 972 | let timestamp = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() as u64; [INFO] [stdout] | --------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 973 | timestamp [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 972 ~ [INFO] [stdout] 973 ~ SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> rndiag-core/src/tool.rs:972:25 [INFO] [stdout] | [INFO] [stdout] 972 | let timestamp = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-core/src/tool.rs:979:35 [INFO] [stdout] | [INFO] [stdout] 979 | let result_ip = lookup_host(&self.target()).unwrap().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.target()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-core/src/tool.rs:997:35 [INFO] [stdout] | [INFO] [stdout] 997 | let result_ip = lookup_host(&self.srv_addr()).unwrap().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.srv_addr()` [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` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/ping.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | / if event::poll(Duration::from_millis(20))? { [INFO] [stdout] 149 | | if let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 150 | | match (key_event.code, key_event.modifiers) { [INFO] [stdout] 151 | | (KeyCode::Char('g'), KeyModifiers::NONE) => { [INFO] [stdout] ... | [INFO] [stdout] 176 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 148 ~ if event::poll(Duration::from_millis(20))? [INFO] [stdout] 149 ~ && let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 150 | match (key_event.code, key_event.modifiers) { [INFO] [stdout] ... [INFO] [stdout] 174 | } [INFO] [stdout] 175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> rndiag-core/src/ping.rs:193:13 [INFO] [stdout] | [INFO] [stdout] 185 | / let res = match ping::new(target_ip) [INFO] [stdout] 186 | | .socket_type(ping::RAW) [INFO] [stdout] 187 | | .timeout(Duration::from_secs(5)) [INFO] [stdout] 188 | | .send() [INFO] [stdout] ... | [INFO] [stdout] 191 | | Err(e) => eprintln!("Ping failed with RAW socket: {}", e), [INFO] [stdout] 192 | | }; [INFO] [stdout] | |______________- unnecessary `let` binding [INFO] [stdout] 193 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 185 ~ [INFO] [stdout] 186 ~ match ping::new(target_ip) [INFO] [stdout] 187 + .socket_type(ping::RAW) [INFO] [stdout] 188 + .timeout(Duration::from_secs(5)) [INFO] [stdout] 189 + .send() [INFO] [stdout] 190 + { [INFO] [stdout] 191 + Ok(_) => {}, [INFO] [stdout] 192 + Err(e) => eprintln!("Ping failed with RAW socket: {}", e), [INFO] [stdout] 193 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> rndiag-core/src/ping.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | / let res = match ping::new(target_ip) [INFO] [stdout] 186 | | .socket_type(ping::RAW) [INFO] [stdout] 187 | | .timeout(Duration::from_secs(5)) [INFO] [stdout] 188 | | .send() [INFO] [stdout] ... | [INFO] [stdout] 191 | | Err(e) => eprintln!("Ping failed with RAW socket: {}", e), [INFO] [stdout] 192 | | }; [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding and replace variable usages with `()` [INFO] [stdout] | [INFO] [stdout] 185 ~ match ping::new(target_ip) [INFO] [stdout] 186 | .socket_type(ping::RAW) [INFO] [stdout] ... [INFO] [stdout] 192 | }; [INFO] [stdout] 193 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:224:30 [INFO] [stdout] | [INFO] [stdout] 224 | if j == scale && opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:230:20 [INFO] [stdout] | [INFO] [stdout] 230 | if opt_graph == true && self.elapsed_time <= 300{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:233:25 [INFO] [stdout] | [INFO] [stdout] 233 | else if opt_graph == true && self.elapsed_time <= 1800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:236:25 [INFO] [stdout] | [INFO] [stdout] 236 | else if opt_graph == true && self.elapsed_time <= 3600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:239:25 [INFO] [stdout] | [INFO] [stdout] 239 | else if opt_graph == true && self.elapsed_time <= 7200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:242:25 [INFO] [stdout] | [INFO] [stdout] 242 | else if opt_graph == true && self.elapsed_time <= 14400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | else if opt_graph == true && self.elapsed_time <= 28800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:248:25 [INFO] [stdout] | [INFO] [stdout] 248 | else if opt_graph == true && self.elapsed_time <= 57600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:251:25 [INFO] [stdout] | [INFO] [stdout] 251 | else if opt_graph == true && self.elapsed_time <= 115200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:254:25 [INFO] [stdout] | [INFO] [stdout] 254 | else if opt_graph == true && self.elapsed_time <= 230400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | else if opt_graph == true && self.elapsed_time <= 460800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:260:25 [INFO] [stdout] | [INFO] [stdout] 260 | else if opt_graph == true && self.elapsed_time <= 921600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:263:25 [INFO] [stdout] | [INFO] [stdout] 263 | else if opt_graph == true && self.elapsed_time <= 1843200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:283:21 [INFO] [stdout] | [INFO] [stdout] 283 | else if opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/nslookup.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | / if event::poll(Duration::from_millis(20))? { [INFO] [stdout] 159 | | if let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 160 | | match (key_event.code, key_event.modifiers) { [INFO] [stdout] 161 | | (KeyCode::Char('g'), KeyModifiers::NONE) => { [INFO] [stdout] ... | [INFO] [stdout] 187 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 158 ~ if event::poll(Duration::from_millis(20))? [INFO] [stdout] 159 ~ && let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 160 | match (key_event.code, key_event.modifiers) { [INFO] [stdout] ... [INFO] [stdout] 185 | } [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:263:30 [INFO] [stdout] | [INFO] [stdout] 263 | if j == scale && opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:269:20 [INFO] [stdout] | [INFO] [stdout] 269 | if opt_graph == true && self.elapsed_time <= 300{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:272:25 [INFO] [stdout] | [INFO] [stdout] 272 | else if opt_graph == true && self.elapsed_time <= 1800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:275:25 [INFO] [stdout] | [INFO] [stdout] 275 | else if opt_graph == true && self.elapsed_time <= 3600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:278:25 [INFO] [stdout] | [INFO] [stdout] 278 | else if opt_graph == true && self.elapsed_time <= 7200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:281:25 [INFO] [stdout] | [INFO] [stdout] 281 | else if opt_graph == true && self.elapsed_time <= 14400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | else if opt_graph == true && self.elapsed_time <= 28800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:287:25 [INFO] [stdout] | [INFO] [stdout] 287 | else if opt_graph == true && self.elapsed_time <= 57600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | else if opt_graph == true && self.elapsed_time <= 115200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:293:25 [INFO] [stdout] | [INFO] [stdout] 293 | else if opt_graph == true && self.elapsed_time <= 230400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:296:25 [INFO] [stdout] | [INFO] [stdout] 296 | else if opt_graph == true && self.elapsed_time <= 460800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:299:25 [INFO] [stdout] | [INFO] [stdout] 299 | else if opt_graph == true && self.elapsed_time <= 921600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:302:25 [INFO] [stdout] | [INFO] [stdout] 302 | else if opt_graph == true && self.elapsed_time <= 1843200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | else if opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/speedtest.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | if self.is_srv == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.is_srv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | / if event::poll(Duration::from_millis(20))? { [INFO] [stdout] 156 | | if let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 157 | | match (key_event.code, key_event.modifiers) { [INFO] [stdout] 158 | | (KeyCode::Char('g'), KeyModifiers::NONE) => { [INFO] [stdout] ... | [INFO] [stdout] 177 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ if event::poll(Duration::from_millis(20))? [INFO] [stdout] 156 ~ && let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 157 | match (key_event.code, key_event.modifiers) { [INFO] [stdout] ... [INFO] [stdout] 175 | } [INFO] [stdout] 176 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:394:17 [INFO] [stdout] | [INFO] [stdout] 394 | / if packet.get_next_level_protocol() == IpNextHeaderProtocols::Tcp { [INFO] [stdout] 395 | | if let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) { [INFO] [stdout] 396 | | if tcp.get_source() == target_port { [INFO] [stdout] 397 | | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] ... | [INFO] [stdout] 400 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 394 ~ if packet.get_next_level_protocol() == IpNextHeaderProtocols::Tcp [INFO] [stdout] 395 ~ && let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) { [INFO] [stdout] 396 | if tcp.get_source() == target_port { [INFO] [stdout] 397 | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] 398 | } [INFO] [stdout] 399 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:395:21 [INFO] [stdout] | [INFO] [stdout] 395 | / if let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) { [INFO] [stdout] 396 | | if tcp.get_source() == target_port { [INFO] [stdout] 397 | | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] 398 | | } [INFO] [stdout] 399 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 395 ~ if let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) [INFO] [stdout] 396 ~ && tcp.get_source() == target_port { [INFO] [stdout] 397 | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] 398 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:459:12 [INFO] [stdout] | [INFO] [stdout] 459 | sum += (tcp_len >> 16) as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(tcp_len >> 16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:460:12 [INFO] [stdout] | [INFO] [stdout] 460 | sum += (tcp_len & 0xFFFF) as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(tcp_len & 0xFFFF)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> rndiag-core/src/tcp_message.rs:154:22 [INFO] [stdout] | [INFO] [stdout] 154 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 154 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] 154 + .map_err(|e| io::Error::other(e))??; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> rndiag-core/src/tcp_message.rs:186:22 [INFO] [stdout] | [INFO] [stdout] 186 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 186 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] 186 + .map_err(|e| io::Error::other(e))??; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:42:35 [INFO] [stdout] | [INFO] [stdout] 42 | let moy_latency = sum_latency as u16 / vec_size as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sum_latency` [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: the variable `n` is used as a loop counter [INFO] [stdout] --> rndiag-core/src/tool.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | for elem in &self.data()[vec_size-scale as usize..]{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (n, elem) in self.data()[vec_size-scale as usize..].iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:115:40 [INFO] [stdout] | [INFO] [stdout] 115 | let moy_latency: u16 = sum_latency as u16 / k as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sum_latency` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:184:42 [INFO] [stdout] | [INFO] [stdout] 184 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:252:47 [INFO] [stdout] | [INFO] [stdout] 252 | let moy_latency_sample = sum_latency_sample as u16 / 15 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:252:75 [INFO] [stdout] | [INFO] [stdout] 252 | let moy_latency_sample = sum_latency_sample as u16 / 15 as u16; [INFO] [stdout] | ^^^^^^^^^ help: try: `15_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:266:42 [INFO] [stdout] | [INFO] [stdout] 266 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:318:47 [INFO] [stdout] | [INFO] [stdout] 318 | let moy_latency_sample = sum_latency_sample as u16 / 30 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:318:75 [INFO] [stdout] | [INFO] [stdout] 318 | let moy_latency_sample = sum_latency_sample as u16 / 30 as u16; [INFO] [stdout] | ^^^^^^^^^ help: try: `30_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:331:42 [INFO] [stdout] | [INFO] [stdout] 331 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:382:47 [INFO] [stdout] | [INFO] [stdout] 382 | let moy_latency_sample = sum_latency_sample as u16 / 60 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:382:75 [INFO] [stdout] | [INFO] [stdout] 382 | let moy_latency_sample = sum_latency_sample as u16 / 60 as u16; [INFO] [stdout] | ^^^^^^^^^ help: try: `60_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:395:42 [INFO] [stdout] | [INFO] [stdout] 395 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:449:47 [INFO] [stdout] | [INFO] [stdout] 449 | let moy_latency_sample = sum_latency_sample as u16 / 120 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:449:75 [INFO] [stdout] | [INFO] [stdout] 449 | let moy_latency_sample = sum_latency_sample as u16 / 120 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `120_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:462:42 [INFO] [stdout] | [INFO] [stdout] 462 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:514:47 [INFO] [stdout] | [INFO] [stdout] 514 | let moy_latency_sample = sum_latency_sample as u16 / 240 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:514:75 [INFO] [stdout] | [INFO] [stdout] 514 | let moy_latency_sample = sum_latency_sample as u16 / 240 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `240_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:527:42 [INFO] [stdout] | [INFO] [stdout] 527 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:579:47 [INFO] [stdout] | [INFO] [stdout] 579 | let moy_latency_sample = sum_latency_sample as u16 / 480 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:579:75 [INFO] [stdout] | [INFO] [stdout] 579 | let moy_latency_sample = sum_latency_sample as u16 / 480 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `480_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:593:42 [INFO] [stdout] | [INFO] [stdout] 593 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:645:47 [INFO] [stdout] | [INFO] [stdout] 645 | let moy_latency_sample = sum_latency_sample as u16 / 960 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:645:75 [INFO] [stdout] | [INFO] [stdout] 645 | let moy_latency_sample = sum_latency_sample as u16 / 960 as u16; [INFO] [stdout] | ^^^^^^^^^^ help: try: `960_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:658:42 [INFO] [stdout] | [INFO] [stdout] 658 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:710:47 [INFO] [stdout] | [INFO] [stdout] 710 | let moy_latency_sample = sum_latency_sample as u16 / 1920 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:710:75 [INFO] [stdout] | [INFO] [stdout] 710 | let moy_latency_sample = sum_latency_sample as u16 / 1920 as u16; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `1920_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:722:42 [INFO] [stdout] | [INFO] [stdout] 722 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:772:47 [INFO] [stdout] | [INFO] [stdout] 772 | let moy_latency_sample = sum_latency_sample as u16 / 3840 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:772:75 [INFO] [stdout] | [INFO] [stdout] 772 | let moy_latency_sample = sum_latency_sample as u16 / 3840 as u16; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `3840_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:785:42 [INFO] [stdout] | [INFO] [stdout] 785 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:836:47 [INFO] [stdout] | [INFO] [stdout] 836 | let moy_latency_sample = sum_latency_sample as u16 / 7680 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:836:75 [INFO] [stdout] | [INFO] [stdout] 836 | let moy_latency_sample = sum_latency_sample as u16 / 7680 as u16; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `7680_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:849:42 [INFO] [stdout] | [INFO] [stdout] 849 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:901:47 [INFO] [stdout] | [INFO] [stdout] 901 | let moy_latency_sample = sum_latency_sample as u16 / 15360 as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> rndiag-core/src/tool.rs:901:75 [INFO] [stdout] | [INFO] [stdout] 901 | let moy_latency_sample = sum_latency_sample as u16 / 15360 as u16; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `15360_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> rndiag-core/src/tool.rs:914:42 [INFO] [stdout] | [INFO] [stdout] 914 | let moy_latency_sample = sum_latency_sample as u16 / interval as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum_latency_sample` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> rndiag-core/src/tool.rs:933:40 [INFO] [stdout] | [INFO] [stdout] 933 | let file_export = File::create(&self.output()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.output()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> rndiag-core/src/tool.rs:948:45 [INFO] [stdout] | [INFO] [stdout] 948 | if let Err(e) = writer.write_record(&["Date", "Ping Number", "Latency"]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["Date", "Ping Number", "Latency"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> rndiag-core/src/tool.rs:973:9 [INFO] [stdout] | [INFO] [stdout] 972 | let timestamp = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() as u64; [INFO] [stdout] | --------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 973 | timestamp [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 972 ~ [INFO] [stdout] 973 ~ SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> rndiag-core/src/tool.rs:972:25 [INFO] [stdout] | [INFO] [stdout] 972 | let timestamp = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-core/src/tool.rs:979:35 [INFO] [stdout] | [INFO] [stdout] 979 | let result_ip = lookup_host(&self.target()).unwrap().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.target()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-core/src/tool.rs:997:35 [INFO] [stdout] | [INFO] [stdout] 997 | let result_ip = lookup_host(&self.srv_addr()).unwrap().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.srv_addr()` [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` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/ping.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | / if event::poll(Duration::from_millis(20))? { [INFO] [stdout] 149 | | if let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 150 | | match (key_event.code, key_event.modifiers) { [INFO] [stdout] 151 | | (KeyCode::Char('g'), KeyModifiers::NONE) => { [INFO] [stdout] ... | [INFO] [stdout] 176 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 148 ~ if event::poll(Duration::from_millis(20))? [INFO] [stdout] 149 ~ && let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 150 | match (key_event.code, key_event.modifiers) { [INFO] [stdout] ... [INFO] [stdout] 174 | } [INFO] [stdout] 175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> rndiag-core/src/ping.rs:193:13 [INFO] [stdout] | [INFO] [stdout] 185 | / let res = match ping::new(target_ip) [INFO] [stdout] 186 | | .socket_type(ping::RAW) [INFO] [stdout] 187 | | .timeout(Duration::from_secs(5)) [INFO] [stdout] 188 | | .send() [INFO] [stdout] ... | [INFO] [stdout] 191 | | Err(e) => eprintln!("Ping failed with RAW socket: {}", e), [INFO] [stdout] 192 | | }; [INFO] [stdout] | |______________- unnecessary `let` binding [INFO] [stdout] 193 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 185 ~ [INFO] [stdout] 186 ~ match ping::new(target_ip) [INFO] [stdout] 187 + .socket_type(ping::RAW) [INFO] [stdout] 188 + .timeout(Duration::from_secs(5)) [INFO] [stdout] 189 + .send() [INFO] [stdout] 190 + { [INFO] [stdout] 191 + Ok(_) => {}, [INFO] [stdout] 192 + Err(e) => eprintln!("Ping failed with RAW socket: {}", e), [INFO] [stdout] 193 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> rndiag-core/src/ping.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | / let res = match ping::new(target_ip) [INFO] [stdout] 186 | | .socket_type(ping::RAW) [INFO] [stdout] 187 | | .timeout(Duration::from_secs(5)) [INFO] [stdout] 188 | | .send() [INFO] [stdout] ... | [INFO] [stdout] 191 | | Err(e) => eprintln!("Ping failed with RAW socket: {}", e), [INFO] [stdout] 192 | | }; [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding and replace variable usages with `()` [INFO] [stdout] | [INFO] [stdout] 185 ~ match ping::new(target_ip) [INFO] [stdout] 186 | .socket_type(ping::RAW) [INFO] [stdout] ... [INFO] [stdout] 192 | }; [INFO] [stdout] 193 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:224:30 [INFO] [stdout] | [INFO] [stdout] 224 | if j == scale && opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:230:20 [INFO] [stdout] | [INFO] [stdout] 230 | if opt_graph == true && self.elapsed_time <= 300{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:233:25 [INFO] [stdout] | [INFO] [stdout] 233 | else if opt_graph == true && self.elapsed_time <= 1800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:236:25 [INFO] [stdout] | [INFO] [stdout] 236 | else if opt_graph == true && self.elapsed_time <= 3600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:239:25 [INFO] [stdout] | [INFO] [stdout] 239 | else if opt_graph == true && self.elapsed_time <= 7200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:242:25 [INFO] [stdout] | [INFO] [stdout] 242 | else if opt_graph == true && self.elapsed_time <= 14400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | else if opt_graph == true && self.elapsed_time <= 28800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:248:25 [INFO] [stdout] | [INFO] [stdout] 248 | else if opt_graph == true && self.elapsed_time <= 57600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:251:25 [INFO] [stdout] | [INFO] [stdout] 251 | else if opt_graph == true && self.elapsed_time <= 115200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:254:25 [INFO] [stdout] | [INFO] [stdout] 254 | else if opt_graph == true && self.elapsed_time <= 230400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | else if opt_graph == true && self.elapsed_time <= 460800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:260:25 [INFO] [stdout] | [INFO] [stdout] 260 | else if opt_graph == true && self.elapsed_time <= 921600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:263:25 [INFO] [stdout] | [INFO] [stdout] 263 | else if opt_graph == true && self.elapsed_time <= 1843200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/ping.rs:283:21 [INFO] [stdout] | [INFO] [stdout] 283 | else if opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/nslookup.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | / if event::poll(Duration::from_millis(20))? { [INFO] [stdout] 159 | | if let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 160 | | match (key_event.code, key_event.modifiers) { [INFO] [stdout] 161 | | (KeyCode::Char('g'), KeyModifiers::NONE) => { [INFO] [stdout] ... | [INFO] [stdout] 187 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 158 ~ if event::poll(Duration::from_millis(20))? [INFO] [stdout] 159 ~ && let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 160 | match (key_event.code, key_event.modifiers) { [INFO] [stdout] ... [INFO] [stdout] 185 | } [INFO] [stdout] 186 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:263:30 [INFO] [stdout] | [INFO] [stdout] 263 | if j == scale && opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:269:20 [INFO] [stdout] | [INFO] [stdout] 269 | if opt_graph == true && self.elapsed_time <= 300{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:272:25 [INFO] [stdout] | [INFO] [stdout] 272 | else if opt_graph == true && self.elapsed_time <= 1800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:275:25 [INFO] [stdout] | [INFO] [stdout] 275 | else if opt_graph == true && self.elapsed_time <= 3600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:278:25 [INFO] [stdout] | [INFO] [stdout] 278 | else if opt_graph == true && self.elapsed_time <= 7200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:281:25 [INFO] [stdout] | [INFO] [stdout] 281 | else if opt_graph == true && self.elapsed_time <= 14400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | else if opt_graph == true && self.elapsed_time <= 28800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:287:25 [INFO] [stdout] | [INFO] [stdout] 287 | else if opt_graph == true && self.elapsed_time <= 57600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | else if opt_graph == true && self.elapsed_time <= 115200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:293:25 [INFO] [stdout] | [INFO] [stdout] 293 | else if opt_graph == true && self.elapsed_time <= 230400{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:296:25 [INFO] [stdout] | [INFO] [stdout] 296 | else if opt_graph == true && self.elapsed_time <= 460800{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:299:25 [INFO] [stdout] | [INFO] [stdout] 299 | else if opt_graph == true && self.elapsed_time <= 921600{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:302:25 [INFO] [stdout] | [INFO] [stdout] 302 | else if opt_graph == true && self.elapsed_time <= 1843200{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/nslookup.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | else if opt_graph == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `opt_graph` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-core/src/speedtest.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | if self.is_srv == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.is_srv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | / if event::poll(Duration::from_millis(20))? { [INFO] [stdout] 156 | | if let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 157 | | match (key_event.code, key_event.modifiers) { [INFO] [stdout] 158 | | (KeyCode::Char('g'), KeyModifiers::NONE) => { [INFO] [stdout] ... | [INFO] [stdout] 177 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ if event::poll(Duration::from_millis(20))? [INFO] [stdout] 156 ~ && let Event::Key(key_event) = event::read().unwrap() { [INFO] [stdout] 157 | match (key_event.code, key_event.modifiers) { [INFO] [stdout] ... [INFO] [stdout] 175 | } [INFO] [stdout] 176 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:394:17 [INFO] [stdout] | [INFO] [stdout] 394 | / if packet.get_next_level_protocol() == IpNextHeaderProtocols::Tcp { [INFO] [stdout] 395 | | if let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) { [INFO] [stdout] 396 | | if tcp.get_source() == target_port { [INFO] [stdout] 397 | | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] ... | [INFO] [stdout] 400 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 394 ~ if packet.get_next_level_protocol() == IpNextHeaderProtocols::Tcp [INFO] [stdout] 395 ~ && let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) { [INFO] [stdout] 396 | if tcp.get_source() == target_port { [INFO] [stdout] 397 | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] 398 | } [INFO] [stdout] 399 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:395:21 [INFO] [stdout] | [INFO] [stdout] 395 | / if let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) { [INFO] [stdout] 396 | | if tcp.get_source() == target_port { [INFO] [stdout] 397 | | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] 398 | | } [INFO] [stdout] 399 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 395 ~ if let Some(tcp) = pnet::packet::tcp::TcpPacket::new(packet.payload()) [INFO] [stdout] 396 ~ && tcp.get_source() == target_port { [INFO] [stdout] 397 | return Some((start.elapsed(), tcp.get_flags())); [INFO] [stdout] 398 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:459:12 [INFO] [stdout] | [INFO] [stdout] 459 | sum += (tcp_len >> 16) as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(tcp_len >> 16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> rndiag-core/src/tcp_ping.rs:460:12 [INFO] [stdout] | [INFO] [stdout] 460 | sum += (tcp_len & 0xFFFF) as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(tcp_len & 0xFFFF)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> rndiag-core/src/tcp_message.rs:154:22 [INFO] [stdout] | [INFO] [stdout] 154 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 154 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] 154 + .map_err(|e| io::Error::other(e))??; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> rndiag-core/src/tcp_message.rs:186:22 [INFO] [stdout] | [INFO] [stdout] 186 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 186 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))??; [INFO] [stdout] 186 + .map_err(|e| io::Error::other(e))??; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking rndiag-metrics v0.1.0 (/opt/rustwide/workdir/rndiag-metrics) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> rndiag-metrics/src/ping_metrics.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `latency_moy_sampled` [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: redundant field names in struct initialization [INFO] [stdout] --> rndiag-metrics/src/ping_metrics.rs:52:58 [INFO] [stdout] | [INFO] [stdout] 52 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dst` [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] --> rndiag-metrics/src/tping_metrics.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `latency_moy_sampled` [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] --> rndiag-metrics/src/tping_metrics.rs:51:58 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dst` [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] --> rndiag-metrics/src/resolver_metrics.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `latency_moy_sampled` [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] --> rndiag-metrics/src/resolver_metrics.rs:51:58 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dst` [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] --> rndiag-metrics/src/ping_metrics.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `latency_moy_sampled` [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: redundant field names in struct initialization [INFO] [stdout] --> rndiag-metrics/src/ping_metrics.rs:52:58 [INFO] [stdout] | [INFO] [stdout] 52 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dst` [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] --> rndiag-metrics/src/tping_metrics.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `latency_moy_sampled` [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] --> rndiag-metrics/src/tping_metrics.rs:51:58 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dst` [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] --> rndiag-metrics/src/resolver_metrics.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `latency_moy_sampled` [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] --> rndiag-metrics/src/resolver_metrics.rs:51:58 [INFO] [stdout] | [INFO] [stdout] 51 | Self { latency_moy_sampled: latency_moy_sampled, dst: dst, latency_level: 0, output_exporter: Vec::new()} [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dst` [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] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking warp v0.3.7 [INFO] [stderr] Checking rndiag-server v0.1.0 (/opt/rustwide/workdir/rndiag-server) [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> rndiag-server/src/web_server.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub async fn launch_srv(parsing_time: u64, addr: &str, addr_srv: &str, port: u16, port_srv: u16, filename: &str, output: &str, nb_ping: u16, flag: u8) { [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] [stderr] Checking rndiag-cli v0.1.0 (/opt/rustwide/workdir/rndiag-cli) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> rndiag-cli/src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> rndiag-cli/src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use tokio; [INFO] [stdout] | ^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> rndiag-server/src/web_server.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub async fn launch_srv(parsing_time: u64, addr: &str, addr_srv: &str, port: u16, port_srv: u16, filename: &str, output: &str, nb_ping: u16, flag: u8) { [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: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if options.exporter == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.exporter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | if options.ping == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `options.ping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | if options.tping == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `options.tping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if options.resolver == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.resolver` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | if options.sptest == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.sptest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | if options.nc == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `options.nc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / if options.exporter == true { [INFO] [stdout] 67 | | if options.port == 0 || options.dst == "none" || options.ws_addr == "none" || options.output == "output.csv" || options.ws... [INFO] [stdout] 68 | | eprintln!("Error ! The destination IP/Hostname, the destination port for the target/exporter web-server, and the outpu... [INFO] [stdout] 69 | | std::process::exit(1); [INFO] [stdout] 70 | | } [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 66 ~ if options.exporter == true [INFO] [stdout] 67 ~ && (options.port == 0 || options.dst == "none" || options.ws_addr == "none" || options.output == "output.csv" || options.ws_port == 0) { [INFO] [stdout] 68 | eprintln!("Error ! The destination IP/Hostname, the destination port for the target/exporter web-server, and the output file is required for exporter mode"); [INFO] [stdout] 69 | std::process::exit(1); [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if options.exporter == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.exporter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / if selected_tool == "tping" || (selected_tool == "diagnostic" && options.dst != "none") { [INFO] [stdout] 74 | | if options.port == 0{ [INFO] [stdout] 75 | | eprintln!("Error ! You must specify the destination port number for tping"); [INFO] [stdout] 76 | | std::process::exit(1); [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 73 ~ if (selected_tool == "tping" || (selected_tool == "diagnostic" && options.dst != "none")) { [INFO] [stdout] 74 ~ && options.port == 0{ [INFO] [stdout] 75 | eprintln!("Error ! You must specify the destination port number for tping"); [INFO] [stdout] 76 | std::process::exit(1); [INFO] [stdout] 77 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / if selected_tool == "sptest" { [INFO] [stdout] 82 | | if options.port == 0{ [INFO] [stdout] 83 | | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 84 | | std::process::exit(1); [INFO] [stdout] 85 | | } [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 81 ~ if selected_tool == "sptest" [INFO] [stdout] 82 ~ && options.port == 0{ [INFO] [stdout] 83 | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 84 | std::process::exit(1); [INFO] [stdout] 85 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / if selected_tool == "nc" { [INFO] [stdout] 89 | | if options.port == 0{ [INFO] [stdout] 90 | | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 91 | | std::process::exit(1); [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 88 ~ if selected_tool == "nc" [INFO] [stdout] 89 ~ && options.port == 0{ [INFO] [stdout] 90 | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 91 | std::process::exit(1); [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:42 [INFO] [stdout] | [INFO] [stdout] 111 | if selected_tool == "diagnostic" && (options.ping == true || options.resolver == true || options.tping == true || options.sptes... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `options.ping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:66 [INFO] [stdout] | [INFO] [stdout] 111 | if selected_tool == "diagnostic" && (options.ping == true || options.resolver == true || options.tping == true || options.sptes... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.resolver` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:94 [INFO] [stdout] | [INFO] [stdout] 111 | ... == true || options.resolver == true || options.tping == true || options.sptest == true || options.nc == true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `options.tping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:119 [INFO] [stdout] | [INFO] [stdout] 111 | ...er == true || options.tping == true || options.sptest == true || options.nc == true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.sptest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:145 [INFO] [stdout] | [INFO] [stdout] 111 | ...tping == true || options.sptest == true || options.nc == true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `options.nc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:115:64 [INFO] [stdout] | [INFO] [stdout] 115 | if (selected_tool != "sptest" && selected_tool != "nc") && options.server == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.server` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:134:10 [INFO] [stdout] | [INFO] [stdout] 134 | else if addr.split('.').all(|label| {!label.is_empty() && label.len() <= 63 && label.chars().all(|c| c.is_ascii_alphanumeric(... [INFO] [stdout] | __________^ [INFO] [stdout] 135 | | is_addr = true; [INFO] [stdout] 136 | | } [INFO] [stdout] 137 | | else{ [INFO] [stdout] 138 | | is_addr = false; [INFO] [stdout] 139 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ is_addr = addr.split('.').all(|label| {!label.is_empty() && label.len() <= 63 && label.chars().all(|c| c.is_ascii_alphanumeric() || c == '-') && !label.starts_with('-') && !label.ends_with('-')}); }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:141:8 [INFO] [stdout] | [INFO] [stdout] 141 | if is_addr == false{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `!is_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 148 | pub fn flag_format(flag: &String) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 148 - pub fn flag_format(flag: &String) -> Option { [INFO] [stdout] 148 + pub fn flag_format(flag: &str) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F" || flag == "R" || flag == "P" || flag == "U") { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F" || flag == "R" || flag == "P") && flag != "U" { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F" || flag == "R") && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F") && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/diagnostic.rs:2:32 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn packet_received(packet: &Vec) -> u8{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 2 - pub fn packet_received(packet: &Vec) -> u8{ [INFO] [stdout] 2 + pub fn packet_received(packet: &[u16]) -> u8{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/diagnostic.rs:27:39 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] 27 + pub fn output_format(latency_moy_vec: &[u8], zero_vec: &Vec){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/diagnostic.rs:27:59 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] 27 + pub fn output_format(latency_moy_vec: &Vec, zero_vec: &[u8]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/main.rs:119:8 [INFO] [stdout] | [INFO] [stdout] 119 | if options.exporter == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.exporter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/main.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | / if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 164 | | { [INFO] [stdout] 165 | | if let Err(e) = nslookup_tool.export_csv() { [INFO] [stdout] 166 | | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 167 | | } [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 163 ~ if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 164 ~ && let Err(e) = nslookup_tool.export_csv() { [INFO] [stdout] 165 | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/main.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | / if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 183 | | { [INFO] [stdout] 184 | | if let Err(e) = tcpping.export_csv() { [INFO] [stdout] 185 | | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 186 | | } [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 182 ~ if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 183 ~ && let Err(e) = tcpping.export_csv() { [INFO] [stdout] 184 | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 185 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:242:55 [INFO] [stdout] | [INFO] [stdout] 242 | zero_vec.push(diagnostic::packet_received(&dping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `dping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:243:55 [INFO] [stdout] | [INFO] [stdout] 243 | zero_vec.push(diagnostic::packet_received(&dtping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `dtping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:244:55 [INFO] [stdout] | [INFO] [stdout] 244 | zero_vec.push(diagnostic::packet_received(&dresolver.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `dresolver.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if options.exporter == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.exporter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:285:55 [INFO] [stdout] | [INFO] [stdout] 285 | zero_vec.push(diagnostic::packet_received(&dping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `dping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:286:55 [INFO] [stdout] | [INFO] [stdout] 286 | zero_vec.push(diagnostic::packet_received(&dtping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `dtping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | if options.ping == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `options.ping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:287:55 [INFO] [stdout] | [INFO] [stdout] 287 | zero_vec.push(diagnostic::packet_received(&dresolver.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `dresolver.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | if options.tping == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `options.tping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if options.resolver == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.resolver` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | if options.sptest == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.sptest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | if options.nc == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `options.nc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / if options.exporter == true { [INFO] [stdout] 67 | | if options.port == 0 || options.dst == "none" || options.ws_addr == "none" || options.output == "output.csv" || options.ws... [INFO] [stdout] 68 | | eprintln!("Error ! The destination IP/Hostname, the destination port for the target/exporter web-server, and the outpu... [INFO] [stdout] 69 | | std::process::exit(1); [INFO] [stdout] 70 | | } [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 66 ~ if options.exporter == true [INFO] [stdout] 67 ~ && (options.port == 0 || options.dst == "none" || options.ws_addr == "none" || options.output == "output.csv" || options.ws_port == 0) { [INFO] [stdout] 68 | eprintln!("Error ! The destination IP/Hostname, the destination port for the target/exporter web-server, and the output file is required for exporter mode"); [INFO] [stdout] 69 | std::process::exit(1); [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if options.exporter == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.exporter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / if selected_tool == "tping" || (selected_tool == "diagnostic" && options.dst != "none") { [INFO] [stdout] 74 | | if options.port == 0{ [INFO] [stdout] 75 | | eprintln!("Error ! You must specify the destination port number for tping"); [INFO] [stdout] 76 | | std::process::exit(1); [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 73 ~ if (selected_tool == "tping" || (selected_tool == "diagnostic" && options.dst != "none")) { [INFO] [stdout] 74 ~ && options.port == 0{ [INFO] [stdout] 75 | eprintln!("Error ! You must specify the destination port number for tping"); [INFO] [stdout] 76 | std::process::exit(1); [INFO] [stdout] 77 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / if selected_tool == "sptest" { [INFO] [stdout] 82 | | if options.port == 0{ [INFO] [stdout] 83 | | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 84 | | std::process::exit(1); [INFO] [stdout] 85 | | } [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 81 ~ if selected_tool == "sptest" [INFO] [stdout] 82 ~ && options.port == 0{ [INFO] [stdout] 83 | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 84 | std::process::exit(1); [INFO] [stdout] 85 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / if selected_tool == "nc" { [INFO] [stdout] 89 | | if options.port == 0{ [INFO] [stdout] 90 | | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 91 | | std::process::exit(1); [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 88 ~ if selected_tool == "nc" [INFO] [stdout] 89 ~ && options.port == 0{ [INFO] [stdout] 90 | eprintln!("Error ! You must sepcify the destination port number for sptest"); [INFO] [stdout] 91 | std::process::exit(1); [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:42 [INFO] [stdout] | [INFO] [stdout] 111 | if selected_tool == "diagnostic" && (options.ping == true || options.resolver == true || options.tping == true || options.sptes... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `options.ping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:66 [INFO] [stdout] | [INFO] [stdout] 111 | if selected_tool == "diagnostic" && (options.ping == true || options.resolver == true || options.tping == true || options.sptes... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.resolver` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:94 [INFO] [stdout] | [INFO] [stdout] 111 | ... == true || options.resolver == true || options.tping == true || options.sptest == true || options.nc == true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `options.tping` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:119 [INFO] [stdout] | [INFO] [stdout] 111 | ...er == true || options.tping == true || options.sptest == true || options.nc == true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.sptest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:111:145 [INFO] [stdout] | [INFO] [stdout] 111 | ...tping == true || options.sptest == true || options.nc == true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `options.nc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:115:64 [INFO] [stdout] | [INFO] [stdout] 115 | if (selected_tool != "sptest" && selected_tool != "nc") && options.server == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.server` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:134:10 [INFO] [stdout] | [INFO] [stdout] 134 | else if addr.split('.').all(|label| {!label.is_empty() && label.len() <= 63 && label.chars().all(|c| c.is_ascii_alphanumeric(... [INFO] [stdout] | __________^ [INFO] [stdout] 135 | | is_addr = true; [INFO] [stdout] 136 | | } [INFO] [stdout] 137 | | else{ [INFO] [stdout] 138 | | is_addr = false; [INFO] [stdout] 139 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ is_addr = addr.split('.').all(|label| {!label.is_empty() && label.len() <= 63 && label.chars().all(|c| c.is_ascii_alphanumeric() || c == '-') && !label.starts_with('-') && !label.ends_with('-')}); }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:141:8 [INFO] [stdout] | [INFO] [stdout] 141 | if is_addr == false{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `!is_addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 148 | pub fn flag_format(flag: &String) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 148 - pub fn flag_format(flag: &String) -> Option { [INFO] [stdout] 148 + pub fn flag_format(flag: &str) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F" || flag == "R" || flag == "P" || flag == "U") { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F" || flag == "R" || flag == "P") && flag != "U" { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F" || flag == "R") && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> rndiag-cli/src/sanitizer.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if !(flag == "S" || flag == "A" || flag == "F") && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] 161 - if flag != "S" && flag != "A" && flag != "F" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] 161 + if flag != "S" && flag != "A" && flag != "F" && flag != "R" && flag != "P" && flag != "U" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/diagnostic.rs:2:32 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn packet_received(packet: &Vec) -> u8{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 2 - pub fn packet_received(packet: &Vec) -> u8{ [INFO] [stdout] 2 + pub fn packet_received(packet: &[u16]) -> u8{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/diagnostic.rs:27:39 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] 27 + pub fn output_format(latency_moy_vec: &[u8], zero_vec: &Vec){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> rndiag-cli/src/diagnostic.rs:27:59 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - pub fn output_format(latency_moy_vec: &Vec, zero_vec: &Vec){ [INFO] [stdout] 27 + pub fn output_format(latency_moy_vec: &Vec, zero_vec: &[u8]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> rndiag-cli/src/main.rs:119:8 [INFO] [stdout] | [INFO] [stdout] 119 | if options.exporter == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `options.exporter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/main.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | / if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 164 | | { [INFO] [stdout] 165 | | if let Err(e) = nslookup_tool.export_csv() { [INFO] [stdout] 166 | | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 167 | | } [INFO] [stdout] 168 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 163 ~ if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 164 ~ && let Err(e) = nslookup_tool.export_csv() { [INFO] [stdout] 165 | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> rndiag-cli/src/main.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | / if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 183 | | { [INFO] [stdout] 184 | | if let Err(e) = tcpping.export_csv() { [INFO] [stdout] 185 | | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 186 | | } [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 182 ~ if &options.output != "AjaNuP123YuL903nNNaZY" [INFO] [stdout] 183 ~ && let Err(e) = tcpping.export_csv() { [INFO] [stdout] 184 | eprintln!("Erreur d'export CSV : {}", e); [INFO] [stdout] 185 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:242:55 [INFO] [stdout] | [INFO] [stdout] 242 | zero_vec.push(diagnostic::packet_received(&dping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `dping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:243:55 [INFO] [stdout] | [INFO] [stdout] 243 | zero_vec.push(diagnostic::packet_received(&dtping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `dtping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:244:55 [INFO] [stdout] | [INFO] [stdout] 244 | zero_vec.push(diagnostic::packet_received(&dresolver.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `dresolver.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:285:55 [INFO] [stdout] | [INFO] [stdout] 285 | zero_vec.push(diagnostic::packet_received(&dping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `dping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:286:55 [INFO] [stdout] | [INFO] [stdout] 286 | zero_vec.push(diagnostic::packet_received(&dtping.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `dtping.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> rndiag-cli/src/main.rs:287:55 [INFO] [stdout] | [INFO] [stdout] 287 | zero_vec.push(diagnostic::packet_received(&dresolver.data())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `dresolver.data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 31s [INFO] running `Command { std: "docker" "inspect" "23df23f71a8161b9bb1d253f0f6bf91ddb07fb723ee2c0cde035b374909fe7ee", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "23df23f71a8161b9bb1d253f0f6bf91ddb07fb723ee2c0cde035b374909fe7ee", kill_on_drop: false }` [INFO] [stdout] 23df23f71a8161b9bb1d253f0f6bf91ddb07fb723ee2c0cde035b374909fe7ee