[INFO] cloning repository https://github.com/juerson/wireguard2clash [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/juerson/wireguard2clash" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjuerson%2Fwireguard2clash", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjuerson%2Fwireguard2clash'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 72774f32463cfafee54bec249c319916ffc4391a [INFO] linting juerson/wireguard2clash against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjuerson%2Fwireguard2clash" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/juerson/wireguard2clash [INFO] finished tweaking git repo https://github.com/juerson/wireguard2clash [INFO] tweaked toml for git repo https://github.com/juerson/wireguard2clash written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/juerson/wireguard2clash 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/juerson/wireguard2clash already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cc v1.0.103 [INFO] [stderr] Downloaded serde_json v1.0.119 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] d6695b4b137ed572dd8f5059bf58730d5cd51fa35bf20a3affefb3078b592e23 [INFO] running `Command { std: "docker" "start" "-a" "d6695b4b137ed572dd8f5059bf58730d5cd51fa35bf20a3affefb3078b592e23", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d6695b4b137ed572dd8f5059bf58730d5cd51fa35bf20a3affefb3078b592e23", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d6695b4b137ed572dd8f5059bf58730d5cd51fa35bf20a3affefb3078b592e23", kill_on_drop: false }` [INFO] [stdout] d6695b4b137ed572dd8f5059bf58730d5cd51fa35bf20a3affefb3078b592e23 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] a300fa0fbda15af9d1ab6de0d38f4242d66ba76aea4bbacc857835deb465c45f [INFO] running `Command { std: "docker" "start" "-a" "a300fa0fbda15af9d1ab6de0d38f4242d66ba76aea4bbacc857835deb465c45f", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.78 [INFO] [stderr] Checking itoa v1.0.10 [INFO] [stderr] Compiling cc v1.0.103 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Compiling serde v1.0.196 [INFO] [stderr] Checking futures-task v0.3.30 [INFO] [stderr] Checking hashbrown v0.14.3 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking http v1.1.0 [INFO] [stderr] Compiling openssl v0.10.64 [INFO] [stderr] Checking ryu v1.0.16 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking indexmap v2.2.5 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Compiling serde_json v1.0.119 [INFO] [stderr] Checking rustls-pki-types v1.7.0 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Compiling syn v2.0.48 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rustls-pemfile v2.1.2 [INFO] [stderr] Checking url v2.5.2 [INFO] [stderr] Checking sync_wrapper v1.0.1 [INFO] [stderr] Checking http-body v1.0.0 [INFO] [stderr] Checking ipnet v2.9.0 [INFO] [stderr] Checking csv-core v0.1.11 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling openssl-sys v0.9.102 [INFO] [stderr] Compiling native-tls v0.2.12 [INFO] [stderr] Checking http-body-util v0.1.2 [INFO] [stderr] Compiling tokio-macros v2.3.0 [INFO] [stderr] Compiling serde_derive v1.0.196 [INFO] [stderr] Compiling pin-project-internal v1.1.5 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking tokio v1.38.0 [INFO] [stderr] Checking pin-project v1.1.5 [INFO] [stderr] Checking tokio-util v0.7.11 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking csv v1.3.0 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking ipnetwork v0.20.0 [INFO] [stderr] Checking h2 v0.4.5 [INFO] [stderr] Checking hyper v1.3.1 [INFO] [stderr] Checking hyper-util v0.1.5 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.5 [INFO] [stderr] Checking wireguard2clash v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/utils/config.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** 13个代理分组 */ [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | const NODE_SELECTION: &str = r#" - name: 🔰 节点选择 [INFO] [stdout] | -------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** 13个代理分组 */ [INFO] [stdout] 1 + /*! 13个代理分组 */ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Data` is never constructed [INFO] [stdout] --> test/从网络上下载规则,拼接成clash的规则.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct Data { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/utils/config.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** 13个代理分组 */ [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | const NODE_SELECTION: &str = r#" - name: 🔰 节点选择 [INFO] [stdout] | -------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** 13个代理分组 */ [INFO] [stdout] 1 + /*! 13个代理分组 */ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> test/从网络上下载规则,拼接成clash的规则.rs:64:42 [INFO] [stdout] | [INFO] [stdout] 64 | ... value_str.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> test/从网络上下载规则,拼接成clash的规则.rs:68:62 [INFO] [stdout] | [INFO] [stdout] 68 | ... format!("DOMAIN,{},{}", value_str.to_string(), proxy_type) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/utils/config.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** 13个代理分组 */ [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | const NODE_SELECTION: &str = r#" - name: 🔰 节点选择 [INFO] [stdout] | -------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** 13个代理分组 */ [INFO] [stdout] 1 + /*! 13个代理分组 */ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/utils/config.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** 13个代理分组 */ [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | const NODE_SELECTION: &str = r#" - name: 🔰 节点选择 [INFO] [stdout] | -------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** 13个代理分组 */ [INFO] [stdout] 1 + /*! 13个代理分组 */ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/utils/config.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** 13个代理分组 */ [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | const NODE_SELECTION: &str = r#" - name: 🔰 节点选择 [INFO] [stdout] | -------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** 13个代理分组 */ [INFO] [stdout] 1 + /*! 13个代理分组 */ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/utils/vector.rs:5:26 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a Vec) -> Vec [INFO] [stdout] | ^ [INFO] [stdout] 6 | where [INFO] [stdout] 7 | T: Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Data` is never constructed [INFO] [stdout] --> test/从网络上下载规则,拼接成clash的规则.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct Data { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/utils/vector.rs:5:26 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a Vec) -> Vec [INFO] [stdout] | ^ [INFO] [stdout] 6 | where [INFO] [stdout] 7 | T: Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> test/从网络上下载规则,拼接成clash的规则.rs:64:42 [INFO] [stdout] | [INFO] [stdout] 64 | ... value_str.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> test/从网络上下载规则,拼接成clash的规则.rs:68:62 [INFO] [stdout] | [INFO] [stdout] 68 | ... format!("DOMAIN,{},{}", value_str.to_string(), proxy_type) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/utils/vector.rs:5:26 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a Vec) -> Vec [INFO] [stdout] | ^ [INFO] [stdout] 6 | where [INFO] [stdout] 7 | T: Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/utils/config.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** 13个代理分组 */ [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | const NODE_SELECTION: &str = r#" - name: 🔰 节点选择 [INFO] [stdout] | -------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** 13个代理分组 */ [INFO] [stdout] 1 + /*! 13个代理分组 */ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/utils/vector.rs:5:26 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a Vec) -> Vec [INFO] [stdout] | ^ [INFO] [stdout] 6 | where [INFO] [stdout] 7 | T: Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/utils/vector.rs:5:26 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a Vec) -> Vec [INFO] [stdout] | ^ [INFO] [stdout] 6 | where [INFO] [stdout] 7 | T: Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/utils/vector.rs:5:26 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a Vec) -> Vec [INFO] [stdout] | ^ [INFO] [stdout] 6 | where [INFO] [stdout] 7 | T: Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/utils/csv.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / for result in rdr.deserialize::() { [INFO] [stdout] 26 | | if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/utils/csv.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] 29 | | if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 25 ~ for record in rdr.deserialize::().flatten() { [INFO] [stdout] 26 ~ // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 27 + if record.loss == "0.00%" { [INFO] [stdout] 28 + if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] 29 + if let Ok(ms) = ms_value.parse::() { [INFO] [stdout] 30 ~ // 延迟delay_number(延迟,单位:ms) [INFO] [stdout] 31 + if ms < delay_number.into() { [INFO] [stdout] 32 + endpoints.push(record.endpoint); [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u16` [INFO] [stdout] --> src/utils/csv.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | if ms < delay_number.into() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `delay_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/delete.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | if !fs::metadata(dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(dir_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/ips.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let ip_network: IpNetwork = match IpNetwork::from_str(&cidr) { [INFO] [stdout] | ^^^^^ help: change this to: `cidr` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:44 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a [T], vec2: &'a Vec) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 19 | match input { [INFO] [stdout] 20 ~ "1" => return vec1.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:62 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a [T]) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 20 | "1" => return vec1.clone(), [INFO] [stdout] 21 ~ "2" => return vec2.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/utils/csv.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / for result in rdr.deserialize::() { [INFO] [stdout] 26 | | if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/utils/csv.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] 29 | | if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 25 ~ for record in rdr.deserialize::().flatten() { [INFO] [stdout] 26 ~ // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 27 + if record.loss == "0.00%" { [INFO] [stdout] 28 + if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] 29 + if let Ok(ms) = ms_value.parse::() { [INFO] [stdout] 30 ~ // 延迟delay_number(延迟,单位:ms) [INFO] [stdout] 31 + if ms < delay_number.into() { [INFO] [stdout] 32 + endpoints.push(record.endpoint); [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u16` [INFO] [stdout] --> src/utils/csv.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | if ms < delay_number.into() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `delay_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/delete.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | if !fs::metadata(dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(dir_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/ips.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let ip_network: IpNetwork = match IpNetwork::from_str(&cidr) { [INFO] [stdout] | ^^^^^ help: change this to: `cidr` [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: unnecessary use of `splitn` [INFO] [stdout] --> src/main_05_group.rs:104:29 [INFO] [stdout] | [INFO] [stdout] 104 | let part3_str = parts [INFO] [stdout] | _____________________________^ [INFO] [stdout] 105 | | .next() [INFO] [stdout] 106 | | .unwrap_or("") [INFO] [stdout] 107 | | .splitn(2, ":") [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_splitn [INFO] [stdout] = note: `#[warn(clippy::needless_splitn)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ let part3_str = parts [INFO] [stdout] 105 + .next() [INFO] [stdout] 106 + .unwrap_or("").split(":") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:44 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a [T], vec2: &'a Vec) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 19 | match input { [INFO] [stdout] 20 ~ "1" => return vec1.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:62 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a [T]) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 20 | "1" => return vec1.clone(), [INFO] [stdout] 21 ~ "2" => return vec2.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main_05_group.rs:186:48 [INFO] [stdout] | [INFO] [stdout] 186 | fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [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] 186 - fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [INFO] [stdout] 186 + fn build_proxy_group_and_rules(proxy_name_vec: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `splitn` [INFO] [stdout] --> src/main.rs:80:29 [INFO] [stdout] | [INFO] [stdout] 80 | let part3_str = parts [INFO] [stdout] | _____________________________^ [INFO] [stdout] 81 | | .next() [INFO] [stdout] 82 | | .unwrap_or("") [INFO] [stdout] 83 | | .splitn(2, ":") [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_splitn [INFO] [stdout] = note: `#[warn(clippy::needless_splitn)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ let part3_str = parts [INFO] [stdout] 81 + .next() [INFO] [stdout] 82 + .unwrap_or("").split(":") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:144:52 [INFO] [stdout] | [INFO] [stdout] 144 | if nodes_count == max_nodes || endpoint == last_endpoint.to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*last_endpoint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/main.rs:170:62 [INFO] [stdout] | [INFO] [stdout] 170 | Err(_) if input.is_empty() || !input.chars().all(|c| c.is_digit(10)) => 500, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:177:48 [INFO] [stdout] | [INFO] [stdout] 177 | fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [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] 177 - fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [INFO] [stdout] 177 + fn build_proxy_group_and_rules(proxy_name_vec: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/main.rs:201:16 [INFO] [stdout] | [INFO] [stdout] 201 | let port = parts [INFO] [stdout] | ________________^ [INFO] [stdout] 202 | | .next() [INFO] [stdout] 203 | | .unwrap_or("2408") [INFO] [stdout] 204 | | .parse() [INFO] [stdout] 205 | | .unwrap_or_else(|_| 2408); [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 205 - .unwrap_or_else(|_| 2408); [INFO] [stdout] 205 + .unwrap_or(2408); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/utils/csv.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / for result in rdr.deserialize::() { [INFO] [stdout] 26 | | if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/utils/csv.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] 29 | | if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 25 ~ for record in rdr.deserialize::().flatten() { [INFO] [stdout] 26 ~ // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 27 + if record.loss == "0.00%" { [INFO] [stdout] 28 + if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] 29 + if let Ok(ms) = ms_value.parse::() { [INFO] [stdout] 30 ~ // 延迟delay_number(延迟,单位:ms) [INFO] [stdout] 31 + if ms < delay_number.into() { [INFO] [stdout] 32 + endpoints.push(record.endpoint); [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/utils/csv.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / for result in rdr.deserialize::() { [INFO] [stdout] 26 | | if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/utils/csv.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] 29 | | if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 25 ~ for record in rdr.deserialize::().flatten() { [INFO] [stdout] 26 ~ // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 27 + if record.loss == "0.00%" { [INFO] [stdout] 28 + if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] 29 + if let Ok(ms) = ms_value.parse::() { [INFO] [stdout] 30 ~ // 延迟delay_number(延迟,单位:ms) [INFO] [stdout] 31 + if ms < delay_number.into() { [INFO] [stdout] 32 + endpoints.push(record.endpoint); [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u16` [INFO] [stdout] --> src/utils/csv.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | if ms < delay_number.into() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `delay_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/delete.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | if !fs::metadata(dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(dir_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u16` [INFO] [stdout] --> src/utils/csv.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | if ms < delay_number.into() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `delay_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/ips.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let ip_network: IpNetwork = match IpNetwork::from_str(&cidr) { [INFO] [stdout] | ^^^^^ help: change this to: `cidr` [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 boolean expression can be simplified [INFO] [stdout] --> src/utils/delete.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | if !fs::metadata(dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(dir_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/ips.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let ip_network: IpNetwork = match IpNetwork::from_str(&cidr) { [INFO] [stdout] | ^^^^^ help: change this to: `cidr` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:44 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a [T], vec2: &'a Vec) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 19 | match input { [INFO] [stdout] 20 ~ "1" => return vec1.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:62 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a [T]) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 20 | "1" => return vec1.clone(), [INFO] [stdout] 21 ~ "2" => return vec2.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:44 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a [T], vec2: &'a Vec) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 19 | match input { [INFO] [stdout] 20 ~ "1" => return vec1.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:62 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a [T]) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 20 | "1" => return vec1.clone(), [INFO] [stdout] 21 ~ "2" => return vec2.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/utils/csv.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / for result in rdr.deserialize::() { [INFO] [stdout] 26 | | if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/utils/csv.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] 29 | | if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 25 ~ for record in rdr.deserialize::().flatten() { [INFO] [stdout] 26 ~ // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 27 + if record.loss == "0.00%" { [INFO] [stdout] 28 + if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] 29 + if let Ok(ms) = ms_value.parse::() { [INFO] [stdout] 30 ~ // 延迟delay_number(延迟,单位:ms) [INFO] [stdout] 31 + if ms < delay_number.into() { [INFO] [stdout] 32 + endpoints.push(record.endpoint); [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u16` [INFO] [stdout] --> src/utils/csv.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | if ms < delay_number.into() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `delay_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/delete.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | if !fs::metadata(dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(dir_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/ips.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let ip_network: IpNetwork = match IpNetwork::from_str(&cidr) { [INFO] [stdout] | ^^^^^ help: change this to: `cidr` [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: unnecessary use of `splitn` [INFO] [stdout] --> src/main.rs:80:29 [INFO] [stdout] | [INFO] [stdout] 80 | let part3_str = parts [INFO] [stdout] | _____________________________^ [INFO] [stdout] 81 | | .next() [INFO] [stdout] 82 | | .unwrap_or("") [INFO] [stdout] 83 | | .splitn(2, ":") [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_splitn [INFO] [stdout] = note: `#[warn(clippy::needless_splitn)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ let part3_str = parts [INFO] [stdout] 81 + .next() [INFO] [stdout] 82 + .unwrap_or("").split(":") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `splitn` [INFO] [stdout] --> src/main_13_group.rs:104:29 [INFO] [stdout] | [INFO] [stdout] 104 | let part3_str = parts [INFO] [stdout] | _____________________________^ [INFO] [stdout] 105 | | .next() [INFO] [stdout] 106 | | .unwrap_or("") [INFO] [stdout] 107 | | .splitn(2, ":") [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_splitn [INFO] [stdout] = note: `#[warn(clippy::needless_splitn)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ let part3_str = parts [INFO] [stdout] 105 + .next() [INFO] [stdout] 106 + .unwrap_or("").split(":") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:44 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a [T], vec2: &'a Vec) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 19 | match input { [INFO] [stdout] 20 ~ "1" => return vec1.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:62 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a [T]) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 20 | "1" => return vec1.clone(), [INFO] [stdout] 21 ~ "2" => return vec2.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/utils/csv.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / for result in rdr.deserialize::() { [INFO] [stdout] 26 | | if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] ... | [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/utils/csv.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Ok(record) = result { [INFO] [stdout] 27 | | // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 28 | | if record.loss == "0.00%" { [INFO] [stdout] 29 | | if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 25 ~ for record in rdr.deserialize::().flatten() { [INFO] [stdout] 26 ~ // 丢包率等于0%且延迟小于delay_number的endpoint添加到endpoints中 [INFO] [stdout] 27 + if record.loss == "0.00%" { [INFO] [stdout] 28 + if let Some(ms_value) = record.delay.strip_suffix(" ms") { [INFO] [stdout] 29 + if let Ok(ms) = ms_value.parse::() { [INFO] [stdout] 30 ~ // 延迟delay_number(延迟,单位:ms) [INFO] [stdout] 31 + if ms < delay_number.into() { [INFO] [stdout] 32 + endpoints.push(record.endpoint); [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:144:52 [INFO] [stdout] | [INFO] [stdout] 144 | if nodes_count == max_nodes || endpoint == last_endpoint.to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*last_endpoint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u16` [INFO] [stdout] --> src/utils/csv.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | if ms < delay_number.into() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `delay_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/delete.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | if !fs::metadata(dir_path).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(dir_path).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `splitn` [INFO] [stdout] --> src/main_13_group.rs:104:29 [INFO] [stdout] | [INFO] [stdout] 104 | let part3_str = parts [INFO] [stdout] | _____________________________^ [INFO] [stdout] 105 | | .next() [INFO] [stdout] 106 | | .unwrap_or("") [INFO] [stdout] 107 | | .splitn(2, ":") [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_splitn [INFO] [stdout] = note: `#[warn(clippy::needless_splitn)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ let part3_str = parts [INFO] [stdout] 105 + .next() [INFO] [stdout] 106 + .unwrap_or("").split(":") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/ips.rs:13:63 [INFO] [stdout] | [INFO] [stdout] 13 | let ip_network: IpNetwork = match IpNetwork::from_str(&cidr) { [INFO] [stdout] | ^^^^^ help: change this to: `cidr` [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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/main.rs:170:62 [INFO] [stdout] | [INFO] [stdout] 170 | Err(_) if input.is_empty() || !input.chars().all(|c| c.is_digit(10)) => 500, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:177:48 [INFO] [stdout] | [INFO] [stdout] 177 | fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [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] 177 - fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [INFO] [stdout] 177 + fn build_proxy_group_and_rules(proxy_name_vec: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:44 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a [T], vec2: &'a Vec) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 19 | match input { [INFO] [stdout] 20 ~ "1" => return vec1.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils/vector.rs:5:62 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a 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] 5 ~ pub fn select_vector<'a, T: Display>(vec1: &'a Vec, vec2: &'a [T]) -> Vec [INFO] [stdout] 6 | where [INFO] [stdout] ... [INFO] [stdout] 20 | "1" => return vec1.clone(), [INFO] [stdout] 21 ~ "2" => return vec2.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/main.rs:201:16 [INFO] [stdout] | [INFO] [stdout] 201 | let port = parts [INFO] [stdout] | ________________^ [INFO] [stdout] 202 | | .next() [INFO] [stdout] 203 | | .unwrap_or("2408") [INFO] [stdout] 204 | | .parse() [INFO] [stdout] 205 | | .unwrap_or_else(|_| 2408); [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 205 - .unwrap_or_else(|_| 2408); [INFO] [stdout] 205 + .unwrap_or(2408); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `splitn` [INFO] [stdout] --> src/main_05_group.rs:104:29 [INFO] [stdout] | [INFO] [stdout] 104 | let part3_str = parts [INFO] [stdout] | _____________________________^ [INFO] [stdout] 105 | | .next() [INFO] [stdout] 106 | | .unwrap_or("") [INFO] [stdout] 107 | | .splitn(2, ":") [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_splitn [INFO] [stdout] = note: `#[warn(clippy::needless_splitn)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ let part3_str = parts [INFO] [stdout] 105 + .next() [INFO] [stdout] 106 + .unwrap_or("").split(":") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main_13_group.rs:186:48 [INFO] [stdout] | [INFO] [stdout] 186 | fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [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] 186 - fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [INFO] [stdout] 186 + fn build_proxy_group_and_rules(proxy_name_vec: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main_13_group.rs:186:48 [INFO] [stdout] | [INFO] [stdout] 186 | fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [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] 186 - fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [INFO] [stdout] 186 + fn build_proxy_group_and_rules(proxy_name_vec: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main_05_group.rs:186:48 [INFO] [stdout] | [INFO] [stdout] 186 | fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [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] 186 - fn build_proxy_group_and_rules(proxy_name_vec: &Vec) -> String { [INFO] [stdout] 186 + fn build_proxy_group_and_rules(proxy_name_vec: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 42.92s [INFO] running `Command { std: "docker" "inspect" "a300fa0fbda15af9d1ab6de0d38f4242d66ba76aea4bbacc857835deb465c45f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a300fa0fbda15af9d1ab6de0d38f4242d66ba76aea4bbacc857835deb465c45f", kill_on_drop: false }` [INFO] [stdout] a300fa0fbda15af9d1ab6de0d38f4242d66ba76aea4bbacc857835deb465c45f