[INFO] cloning repository https://github.com/nikp123/headscale-auto-dns [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nikp123/headscale-auto-dns" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnikp123%2Fheadscale-auto-dns", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnikp123%2Fheadscale-auto-dns'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c214b733018a6eb8c9386553f2cc4295c067d49e [INFO] linting nikp123/headscale-auto-dns against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnikp123%2Fheadscale-auto-dns" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/nikp123/headscale-auto-dns [INFO] finished tweaking git repo https://github.com/nikp123/headscale-auto-dns [INFO] tweaked toml for git repo https://github.com/nikp123/headscale-auto-dns written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/nikp123/headscale-auto-dns 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/nikp123/headscale-auto-dns 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] Downloading crates ... [INFO] [stderr] Downloaded serde-aux v4.6.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] fbbea9e2f8de456ab94154ad3d12dc1f49bfbe2dfc7be6c3f692000b92599b3c [INFO] running `Command { std: "docker" "start" "-a" "fbbea9e2f8de456ab94154ad3d12dc1f49bfbe2dfc7be6c3f692000b92599b3c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fbbea9e2f8de456ab94154ad3d12dc1f49bfbe2dfc7be6c3f692000b92599b3c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fbbea9e2f8de456ab94154ad3d12dc1f49bfbe2dfc7be6c3f692000b92599b3c", kill_on_drop: false }` [INFO] [stdout] fbbea9e2f8de456ab94154ad3d12dc1f49bfbe2dfc7be6c3f692000b92599b3c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 5e05791f4f0c401a51939542d6c72373be700bcd50072810c868dd22e8069ec3 [INFO] running `Command { std: "docker" "start" "-a" "5e05791f4f0c401a51939542d6c72373be700bcd50072810c868dd22e8069ec3", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.94 [INFO] [stderr] Compiling libc v0.2.171 [INFO] [stderr] Compiling cc v1.2.19 [INFO] [stderr] Compiling icu_locid_transform_data v1.5.1 [INFO] [stderr] Checking litemap v0.7.5 [INFO] [stderr] Compiling icu_properties_data v1.5.1 [INFO] [stderr] Compiling icu_normalizer_data v1.5.1 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Compiling openssl v0.10.72 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking anstyle-parse v0.2.6 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Checking anstyle-query v1.1.2 [INFO] [stderr] Checking colorchoice v1.0.3 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking rustls-pki-types v1.11.0 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Checking socket2 v0.5.9 [INFO] [stderr] Checking clap_builder v4.5.36 [INFO] [stderr] Checking ordered-float v2.10.1 [INFO] [stderr] Checking chrono v0.4.40 [INFO] [stderr] Checking tokio v1.44.2 [INFO] [stderr] Checking rustls-pemfile v2.2.0 [INFO] [stderr] Checking anyhow v1.0.98 [INFO] [stderr] Compiling openssl-sys v0.9.107 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking tokio-util v0.7.14 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Checking h2 v0.4.8 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling clap_derive v4.5.32 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking thiserror v2.0.12 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking clap v4.5.36 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking hyper-util v0.1.11 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking serde-value v0.7.0 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking serde-aux v4.6.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking reqwest v0.12.15 [INFO] [stderr] Checking headscale-auto-dns v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/headscale.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use reqwest; [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] --> src/headscale.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use reqwest; [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: all variants have the same prefix: `No` [INFO] [stdout] --> src/traefik.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | / enum TraefikUserError { [INFO] [stdout] 13 | | #[error(r#"No valid Traefik host found.\ [INFO] [stdout] 14 | | Either no eligible Headscale servers exist or no Traefik hosts was defined."#)] [INFO] [stdout] 15 | | NoHosts, [INFO] [stdout] ... | [INFO] [stdout] 19 | | NoSuffix, [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same prefix: `No` [INFO] [stdout] --> src/traefik.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | / enum TraefikUserError { [INFO] [stdout] 13 | | #[error(r#"No valid Traefik host found.\ [INFO] [stdout] 14 | | Either no eligible Headscale servers exist or no Traefik hosts was defined."#)] [INFO] [stdout] 15 | | NoHosts, [INFO] [stdout] ... | [INFO] [stdout] 19 | | NoSuffix, [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/traefik.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | if !self.prefix.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.prefix.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/traefik.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | if !self.suffix.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.suffix.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/traefik.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !self.host.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.host.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/traefik.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | if !self.prefix.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.prefix.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/traefik.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | if !self.suffix.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.suffix.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/traefik.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !self.host.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.host.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/processing.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | if self.setup.allowed_users.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.setup.allowed_users.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/processing.rs:119:18 [INFO] [stdout] | [INFO] [stdout] 119 | .map(|x| Rc::new(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Rc::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/processing.rs:126:32 [INFO] [stdout] | [INFO] [stdout] 126 | ) && x.online).map(|x| Rc::clone(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/processing.rs:129:12 [INFO] [stdout] | [INFO] [stdout] 129 | if self.setup.node_blacklist.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.setup.node_blacklist.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/processing.rs:152:65 [INFO] [stdout] | [INFO] [stdout] 152 | let mut routers = TraefikAPIClient::get_router_list(&client)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `client` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/processing.rs:199:49 [INFO] [stdout] | [INFO] [stdout] 199 | if middlewares.contains(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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` can be collapsed into the outer `match` [INFO] [stdout] --> src/processing.rs:232:36 [INFO] [stdout] | [INFO] [stdout] 232 | Some(r) => if !r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 232 - Some(r) => if !r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 232 + Some(r)f !r.is_match(&dns_entry.name) => { continue;, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/processing.rs:231:21 [INFO] [stdout] | [INFO] [stdout] 231 | / match &self.domain_whitelist { [INFO] [stdout] 232 | | Some(r) => if !r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 233 | | None => {}, [INFO] [stdout] 234 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Some(r) = &self.domain_whitelist { if !r.is_match(&dns_entry.name) { continue; } }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/processing.rs:237:36 [INFO] [stdout] | [INFO] [stdout] 237 | Some(r) => if r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 237 - Some(r) => if r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 237 + Some(r)f r.is_match(&dns_entry.name) => { continue;, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/processing.rs:236:21 [INFO] [stdout] | [INFO] [stdout] 236 | / match &self.domain_blacklist { [INFO] [stdout] 237 | | Some(r) => if r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 238 | | None => {}, [INFO] [stdout] 239 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Some(r) = &self.domain_blacklist { if r.is_match(&dns_entry.name) { continue; } }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/processing.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | if self.setup.allowed_users.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.setup.allowed_users.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/processing.rs:119:18 [INFO] [stdout] | [INFO] [stdout] 119 | .map(|x| Rc::new(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Rc::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/processing.rs:126:32 [INFO] [stdout] | [INFO] [stdout] 126 | ) && x.online).map(|x| Rc::clone(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Rc::clone` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/processing.rs:129:12 [INFO] [stdout] | [INFO] [stdout] 129 | if self.setup.node_blacklist.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.setup.node_blacklist.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/processing.rs:152:65 [INFO] [stdout] | [INFO] [stdout] 152 | let mut routers = TraefikAPIClient::get_router_list(&client)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `client` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/processing.rs:199:49 [INFO] [stdout] | [INFO] [stdout] 199 | if middlewares.contains(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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` can be collapsed into the outer `match` [INFO] [stdout] --> src/processing.rs:232:36 [INFO] [stdout] | [INFO] [stdout] 232 | Some(r) => if !r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 232 - Some(r) => if !r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 232 + Some(r)f !r.is_match(&dns_entry.name) => { continue;, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/processing.rs:231:21 [INFO] [stdout] | [INFO] [stdout] 231 | / match &self.domain_whitelist { [INFO] [stdout] 232 | | Some(r) => if !r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 233 | | None => {}, [INFO] [stdout] 234 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Some(r) = &self.domain_whitelist { if !r.is_match(&dns_entry.name) { continue; } }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/processing.rs:237:36 [INFO] [stdout] | [INFO] [stdout] 237 | Some(r) => if r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 237 - Some(r) => if r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 237 + Some(r)f r.is_match(&dns_entry.name) => { continue;, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/processing.rs:236:21 [INFO] [stdout] | [INFO] [stdout] 236 | / match &self.domain_blacklist { [INFO] [stdout] 237 | | Some(r) => if r.is_match(&dns_entry.name) { continue; }, [INFO] [stdout] 238 | | None => {}, [INFO] [stdout] 239 | | } [INFO] [stdout] | |_____________________^ help: try: `if let Some(r) = &self.domain_blacklist { if r.is_match(&dns_entry.name) { continue; } }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 55.68s [INFO] running `Command { std: "docker" "inspect" "5e05791f4f0c401a51939542d6c72373be700bcd50072810c868dd22e8069ec3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5e05791f4f0c401a51939542d6c72373be700bcd50072810c868dd22e8069ec3", kill_on_drop: false }` [INFO] [stdout] 5e05791f4f0c401a51939542d6c72373be700bcd50072810c868dd22e8069ec3