[INFO] cloning repository https://github.com/openeuler-mirror/utdnsmasq [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/openeuler-mirror/utdnsmasq" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fopeneuler-mirror%2Futdnsmasq", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fopeneuler-mirror%2Futdnsmasq'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] af4aa882c1f7b4ec608ddabf2b24f9fa471142b0 [INFO] linting openeuler-mirror/utdnsmasq against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fopeneuler-mirror%2Futdnsmasq" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-6-tc1/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/openeuler-mirror/utdnsmasq [INFO] finished tweaking git repo https://github.com/openeuler-mirror/utdnsmasq [INFO] tweaked toml for git repo https://github.com/openeuler-mirror/utdnsmasq written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/openeuler-mirror/utdnsmasq 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/openeuler-mirror/utdnsmasq 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] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded if-addrs v0.6.7 [INFO] [stderr] Downloaded boxfnonce v0.1.1 [INFO] [stderr] Downloaded tklog v0.2.9 [INFO] [stderr] Downloaded if-addrs-sys v0.3.2 [INFO] [stderr] Downloaded daemonize v0.4.1 [INFO] [stderr] Downloaded libc v0.1.12 [INFO] [stderr] Downloaded get_if_addrs v0.4.0 [INFO] [stderr] Downloaded syn v2.0.105 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1cb10ebf813e4f2b705df66981bcbe3506e2f08ff1db0d0fb57f434b783de2f4 [INFO] running `Command { std: "docker" "start" "-a" "1cb10ebf813e4f2b705df66981bcbe3506e2f08ff1db0d0fb57f434b783de2f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1cb10ebf813e4f2b705df66981bcbe3506e2f08ff1db0d0fb57f434b783de2f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1cb10ebf813e4f2b705df66981bcbe3506e2f08ff1db0d0fb57f434b783de2f4", kill_on_drop: false }` [INFO] [stdout] 1cb10ebf813e4f2b705df66981bcbe3506e2f08ff1db0d0fb57f434b783de2f4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1a4eaf34b9450543da146c4855fda33f6a9c948ad2116ed76187d907f0141b13 [INFO] running `Command { std: "docker" "start" "-a" "1a4eaf34b9450543da146c4855fda33f6a9c948ad2116ed76187d907f0141b13", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.97 [INFO] [stderr] Compiling zerocopy v0.8.26 [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking crc32fast v1.5.0 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking libc v0.1.12 [INFO] [stderr] Checking boxfnonce v0.1.1 [INFO] [stderr] Checking c_linked_list v1.1.1 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking colored v2.2.0 [INFO] [stderr] Checking daemonize v0.4.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking if-addrs v0.6.7 [INFO] [stderr] Checking get_if_addrs v0.4.0 [INFO] [stderr] Checking users v0.11.0 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking nix v0.23.2 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.105 [INFO] [stderr] Checking regex-automata v0.4.10 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking regex v1.11.2 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Checking tokio v1.47.1 [INFO] [stderr] Checking tklog v0.2.9 [INFO] [stderr] Checking utdnsmasq v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `Ipv6Addr` and `SocketAddr` [INFO] [stdout] --> src/option.rs:7:26 [INFO] [stdout] | [INFO] [stdout] 7 | use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr}; [INFO] [stdout] | ^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `pselect` [INFO] [stdout] --> src/main.rs:537:19 [INFO] [stdout] | [INFO] [stdout] 537 | #[cfg(feature = "pselect")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `pselect` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `pselect` [INFO] [stdout] --> src/main.rs:558:23 [INFO] [stdout] | [INFO] [stdout] 558 | #[cfg(not(feature = "pselect"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `pselect` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/forward_init.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 51 | let forward_records: &mut HashMap = todo!(); [INFO] [stdout] | ------- any code following this expression is unreachable [INFO] [stdout] 52 | // 使用原始文件描述符创建 UdpSocket [INFO] [stdout] 53 | let socket = unsafe { UdpSocket::from_raw_fd(fd) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `up` is never read [INFO] [stdout] --> src/cache.rs:214:17 [INFO] [stdout] | [INFO] [stdout] 214 | up = cache.hash_next; // 更新指针 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `up` is never read [INFO] [stdout] --> src/cache.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | up = cache.hash_next; // 继续移除 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `up` is never read [INFO] [stdout] --> src/cache.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | up = cache.hash_next; // 移除当前元素 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Ipv6Addr` and `SocketAddr` [INFO] [stdout] --> src/option.rs:7:26 [INFO] [stdout] | [INFO] [stdout] 7 | use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr}; [INFO] [stdout] | ^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `pselect` [INFO] [stdout] --> src/main.rs:537:19 [INFO] [stdout] | [INFO] [stdout] 537 | #[cfg(feature = "pselect")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `pselect` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `pselect` [INFO] [stdout] --> src/main.rs:558:23 [INFO] [stdout] | [INFO] [stdout] 558 | #[cfg(not(feature = "pselect"))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `pselect` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `big_name` is assigned to, but never used [INFO] [stdout] --> src/cache.rs:1036:13 [INFO] [stdout] | [INFO] [stdout] 1036 | let mut big_name = None; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_big_name` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `big_name` is never read [INFO] [stdout] --> src/cache.rs:1039:17 [INFO] [stdout] | [INFO] [stdout] 1039 | big_name = Some(free); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `big_name` is never read [INFO] [stdout] --> src/cache.rs:1046:17 [INFO] [stdout] | [INFO] [stdout] 1046 | big_name = Some(Box::new(BigName { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `addrbuff` is never read [INFO] [stdout] --> src/cache.rs:1097:24 [INFO] [stdout] | [INFO] [stdout] 1097 | let mut addrbuff = String::new(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/forward_init.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | mut last_server: Option>, [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fd` [INFO] [stdout] --> src/forward_init.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | fd: i32, [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_fd` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `options` [INFO] [stdout] --> src/forward_init.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | options: u32, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_options` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `packet` [INFO] [stdout] --> src/forward_init.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | packet: &mut Vec, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_packet` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `now` [INFO] [stdout] --> src/forward_init.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | now: SystemTime, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_now` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dnamebuff` [INFO] [stdout] --> src/forward_init.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | dnamebuff: &mut Vec, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dnamebuff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `last_server` [INFO] [stdout] --> src/forward_init.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | mut last_server: Option>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bogus_nxdomain` [INFO] [stdout] --> src/forward_init.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | bogus_nxdomain: Option>, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_bogus_nxdomain` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `caches` [INFO] [stdout] --> src/forward_init.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | caches: &mut Cache, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_caches` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `forward_records` [INFO] [stdout] --> src/forward_init.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let forward_records: &mut HashMap = todo!(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_forward_records` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `argc` [INFO] [stdout] --> src/option.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | argc: usize, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_argc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `argv` [INFO] [stdout] --> src/option.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | argv: Vec, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_argv` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `buff` [INFO] [stdout] --> src/option.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | buff: &mut [u8], [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_buff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resolv_file` [INFO] [stdout] --> src/option.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | resolv_file: &Option>, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_resolv_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mxname` [INFO] [stdout] --> src/option.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | mxname: &Option<&mut String>, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_mxname` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mxtarget` [INFO] [stdout] --> src/option.rs:141:5 [INFO] [stdout] | [INFO] [stdout] 141 | mxtarget: &Option<&mut String>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mxtarget` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lease_file` [INFO] [stdout] --> src/option.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | lease_file: &Option<&str>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_lease_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `username` [INFO] [stdout] --> src/option.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 143 | username: &str, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_username` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `groupname` [INFO] [stdout] --> src/option.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 144 | groupname: &str, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_groupname` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `domain_suffix` [INFO] [stdout] --> src/option.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | domain_suffix: &Option, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_domain_suffix` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `runfile` [INFO] [stdout] --> src/option.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | runfile: Option<&str>, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_runfile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `if_names` [INFO] [stdout] --> src/option.rs:147:5 [INFO] [stdout] | [INFO] [stdout] 147 | if_names: &Option>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_names` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `if_addrs` [INFO] [stdout] --> src/option.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | if_addrs: &Option>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_addrs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `if_except` [INFO] [stdout] --> src/option.rs:149:5 [INFO] [stdout] | [INFO] [stdout] 149 | if_except: &Option>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_except` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bogus_addr` [INFO] [stdout] --> src/option.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | bogus_addr: &Option>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_bogus_addr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `serv_addrs` [INFO] [stdout] --> src/option.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | serv_addrs: &Option>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_serv_addrs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cachesize` [INFO] [stdout] --> src/option.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | cachesize: Option<&mut usize>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cachesize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `port` [INFO] [stdout] --> src/option.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | port: Option<&mut u16>, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_port` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `query_port` [INFO] [stdout] --> src/option.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 154 | query_port: Option<&mut i32>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_query_port` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `local_ttl` [INFO] [stdout] --> src/option.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | local_ttl: Option<&mut u64>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_local_ttl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `addn_hosts` [INFO] [stdout] --> src/option.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | addn_hosts: &Option<&mut String>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_addn_hosts` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp` [INFO] [stdout] --> src/option.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | dhcp: &Option>, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_conf` [INFO] [stdout] --> src/option.rs:158:5 [INFO] [stdout] | [INFO] [stdout] 158 | dhcp_conf: &Option>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_conf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `opts` [INFO] [stdout] --> src/option.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | opts: Option>, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_opts` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_file` [INFO] [stdout] --> src/option.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | dhcp_file: Option<&mut String>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_sname` [INFO] [stdout] --> src/option.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | dhcp_sname: Option<&mut String>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_sname` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_next_server` [INFO] [stdout] --> src/option.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | dhcp_next_server: Ipv4Addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_next_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/forward_init.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 51 | let forward_records: &mut HashMap = todo!(); [INFO] [stdout] | ------- any code following this expression is unreachable [INFO] [stdout] 52 | // 使用原始文件描述符创建 UdpSocket [INFO] [stdout] 53 | let socket = unsafe { UdpSocket::from_raw_fd(fd) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | let mut leasefd = lease_init( [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | let mut laster_server = servers.clone(); [INFO] [stdout] | ----^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `serverfdp` [INFO] [stdout] --> src/main.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | let serverfdp: Option> = None; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_serverfdp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leasefd` [INFO] [stdout] --> src/main.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | let mut leasefd = lease_init( [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_leasefd` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pidfile` [INFO] [stdout] --> src/main.rs:268:13 [INFO] [stdout] | [INFO] [stdout] 268 | let pidfile: Option = match File::create("pidfile.txt") { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pidfile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dnamebuff` [INFO] [stdout] --> src/main.rs:387:13 [INFO] [stdout] | [INFO] [stdout] 387 | let dnamebuff = config.start.to_string(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dnamebuff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `packet` [INFO] [stdout] --> src/main.rs:390:13 [INFO] [stdout] | [INFO] [stdout] 390 | let packet = if config.lease_time == 0 { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_packet` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `laster_server` [INFO] [stdout] --> src/main.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | let mut laster_server = servers.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_laster_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `last_server` [INFO] [stdout] --> src/main.rs:642:33 [INFO] [stdout] | [INFO] [stdout] 642 | ... let last_server = servers.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `now` is never read [INFO] [stdout] --> src/main.rs:98:31 [INFO] [stdout] | [INFO] [stdout] 98 | let mut now: SystemTime = SystemTime::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `source`, `fd`, and `time` are never read [INFO] [stdout] --> src/forward_init.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct FRec { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 12 | source: MySockAddr, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | fd: i32, [INFO] [stdout] | ^^ [INFO] [stdout] 17 | time: std::time::SystemTime, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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/cache.rs:229:67 [INFO] [stdout] | [INFO] [stdout] 229 | if let Err(err) = read_hostsfile(caches, HOSTSFILE, opts, &mut buff, &mut domain_suffix, 0) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `buff` [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/cache.rs:241:13 [INFO] [stdout] | [INFO] [stdout] 241 | &mut buff, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `buff` [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: manual check for common ascii range [INFO] [stdout] --> src/cache.rs:389:19 [INFO] [stdout] | [INFO] [stdout] 389 | val += if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 389 - val += if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] 389 + val += if c.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/cache.rs:390:17 [INFO] [stdout] | [INFO] [stdout] 390 | c + (b'a' - b'A') as u8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(b'a' - b'A')` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/cache.rs:490:59 [INFO] [stdout] | [INFO] [stdout] 490 | Cache::cache_link(cache, unsafe { &mut *Box::from_raw(current_ptr) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut Box::from_raw(current_ptr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/cache.rs:600:1 [INFO] [stdout] | [INFO] [stdout] 600 | pub unsafe fn cache_free(cache: &mut Cache, crecp: *mut Crec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/cache.rs:983:20 [INFO] [stdout] | [INFO] [stdout] 983 | let name_str = match str::from_utf8(name) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 984 | | Ok(valid_str) => Some(valid_str), [INFO] [stdout] 985 | | Err(_) => None, // 如果转换失败,忽略此字符串 [INFO] [stdout] 986 | | }; [INFO] [stdout] | |_____^ help: replace with: `str::from_utf8(name).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Result::unwrap_or` [INFO] [stdout] --> src/cache.rs:1105:20 [INFO] [stdout] | [INFO] [stdout] 1105 | let name_str = match str::from_utf8(name) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 1106 | | Ok(valid_str) => valid_str, [INFO] [stdout] 1107 | | Err(_) => "", [INFO] [stdout] 1108 | | }; [INFO] [stdout] | |_____^ help: replace with: `str::from_utf8(name).unwrap_or("")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dhcp.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | / if config.clid_len == clid_len && config.clid == clid { [INFO] [stdout] 27 | | if is_addr_in_context(context, config) { [INFO] [stdout] 28 | | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [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] 26 ~ if config.clid_len == clid_len && config.clid == clid [INFO] [stdout] 27 ~ && is_addr_in_context(context, config) { [INFO] [stdout] 28 | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 29 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dhcp.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] { [INFO] [stdout] 34 | | if is_addr_in_context(context, config) { [INFO] [stdout] 35 | | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 36 | | } [INFO] [stdout] 37 | | } [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] 33 ~ if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] [INFO] [stdout] 34 ~ && is_addr_in_context(context, config) { [INFO] [stdout] 35 | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 36 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/dhcp.rs:33:67 [INFO] [stdout] | [INFO] [stdout] 33 | if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 33 - if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] { [INFO] [stdout] 33 + if clid[0] == 0 && config.clid_len == clid_len - 1 && config.clid[..] == clid[1..] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `up` is never read [INFO] [stdout] --> src/cache.rs:214:17 [INFO] [stdout] | [INFO] [stdout] 214 | up = cache.hash_next; // 更新指针 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `up` is never read [INFO] [stdout] --> src/cache.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | up = cache.hash_next; // 继续移除 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `up` is never read [INFO] [stdout] --> src/cache.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | up = cache.hash_next; // 移除当前元素 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/forward_init.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / pub fn reply_query( [INFO] [stdout] 42 | | fd: i32, [INFO] [stdout] 43 | | options: u32, [INFO] [stdout] 44 | | packet: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 49 | | caches: &mut Cache, [INFO] [stdout] 50 | | ) -> Option> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/forward_init.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | / if opcode == 0 { [INFO] [stdout] 82 | | if !(bogus_nxdomain.is_some() [INFO] [stdout] 83 | | && rcode == 0 [INFO] [stdout] 84 | | && check_for_bogus_wildcard( [INFO] [stdout] ... | [INFO] [stdout] 100 | | } [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 opcode == 0 [INFO] [stdout] 82 ~ && !(bogus_nxdomain.is_some() [INFO] [stdout] 83 | && rcode == 0 [INFO] [stdout] ... [INFO] [stdout] 98 | } [INFO] [stdout] 99 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/forward_init.rs:107:20 [INFO] [stdout] | [INFO] [stdout] 107 | if let Err(_) = socket.send_to(&packet[..n], src_addr) { [INFO] [stdout] | -------^^^^^^----------------------------------------- help: try: `if socket.send_to(&packet[..n], src_addr).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | LOG.set_formatter(s.as_str()).uselog(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | LOG.set_cutmode_by_time(LOG_FILE, MODE::MONTH, 0, false); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | LOG.set_level(tklog::LEVEL::Debug); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | LOG.set_printmode(tklog::PRINTMODE::PUNCTUAL); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `big_name` is assigned to, but never used [INFO] [stdout] --> src/cache.rs:1036:13 [INFO] [stdout] | [INFO] [stdout] 1036 | let mut big_name = None; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_big_name` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `big_name` is never read [INFO] [stdout] --> src/cache.rs:1039:17 [INFO] [stdout] | [INFO] [stdout] 1039 | big_name = Some(free); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `big_name` is never read [INFO] [stdout] --> src/cache.rs:1046:17 [INFO] [stdout] | [INFO] [stdout] 1046 | big_name = Some(Box::new(BigName { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/network.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | if current_name [INFO] [stdout] | ________________^ [INFO] [stdout] 36 | | .name [INFO] [stdout] 37 | | .as_ref() [INFO] [stdout] 38 | | .map_or(false, |n| n.as_str() == name) [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 38 - .map_or(false, |n| n.as_str() == name) [INFO] [stdout] 38 + .is_some_and(|n| n.as_str() == name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/network.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if tmp.is_none() { [INFO] [stdout] 65 | | return None; [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ help: replace it with: `tmp.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/network.rs:72:16 [INFO] [stdout] | [INFO] [stdout] 72 | if current_except [INFO] [stdout] | ________________^ [INFO] [stdout] 73 | | .name [INFO] [stdout] 74 | | .as_ref() [INFO] [stdout] 75 | | .map_or(false, |n| n.as_str() == name) [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 75 - .map_or(false, |n| n.as_str() == name) [INFO] [stdout] 75 + .is_some_and(|n| n.as_str() == name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/network.rs:176:46 [INFO] [stdout] | [INFO] [stdout] 176 | if iface.name != "lo" && !(flags & (0x8 | 0x10) != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(flags & (0x8 | 0x10) == 0)` [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: value assigned to `addrbuff` is never read [INFO] [stdout] --> src/cache.rs:1097:24 [INFO] [stdout] | [INFO] [stdout] 1097 | let mut addrbuff = String::new(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/forward_init.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | mut last_server: Option>, [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fd` [INFO] [stdout] --> src/forward_init.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | fd: i32, [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_fd` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `options` [INFO] [stdout] --> src/forward_init.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | options: u32, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_options` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `packet` [INFO] [stdout] --> src/forward_init.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | packet: &mut Vec, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_packet` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `now` [INFO] [stdout] --> src/forward_init.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | now: SystemTime, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_now` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dnamebuff` [INFO] [stdout] --> src/forward_init.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | dnamebuff: &mut Vec, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dnamebuff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `last_server` [INFO] [stdout] --> src/forward_init.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | mut last_server: Option>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bogus_nxdomain` [INFO] [stdout] --> src/forward_init.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | bogus_nxdomain: Option>, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_bogus_nxdomain` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `caches` [INFO] [stdout] --> src/forward_init.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | caches: &mut Cache, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_caches` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `forward_records` [INFO] [stdout] --> src/forward_init.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let forward_records: &mut HashMap = todo!(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_forward_records` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (27/7) [INFO] [stdout] --> src/option.rs:135:1 [INFO] [stdout] | [INFO] [stdout] 135 | / pub fn read_opts( [INFO] [stdout] 136 | | argc: usize, [INFO] [stdout] 137 | | argv: Vec, [INFO] [stdout] 138 | | buff: &mut [u8], [INFO] [stdout] ... | [INFO] [stdout] 162 | | dhcp_next_server: Ipv4Addr, [INFO] [stdout] 163 | | ) -> u32 { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `p.get(0)` [INFO] [stdout] --> src/rfc1035.rs:180:26 [INFO] [stdout] | [INFO] [stdout] 180 | while let Some(&l) = p.get(0) { [INFO] [stdout] | ^^^^^^^^ help: try: `p.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/rfc1035.rs:185:16 [INFO] [stdout] | [INFO] [stdout] 185 | if p.len() < 1 || p.as_ptr() as usize - header.as_ptr() as usize + 1 >= plen { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.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: length comparison to one [INFO] [stdout] --> src/rfc1035.rs:210:16 [INFO] [stdout] | [INFO] [stdout] 210 | if p.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.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: unused variable: `argc` [INFO] [stdout] --> src/option.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | argc: usize, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_argc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `argv` [INFO] [stdout] --> src/option.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | argv: Vec, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_argv` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `buff` [INFO] [stdout] --> src/option.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | buff: &mut [u8], [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_buff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resolv_file` [INFO] [stdout] --> src/option.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | resolv_file: &Option>, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_resolv_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mxname` [INFO] [stdout] --> src/option.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | mxname: &Option<&mut String>, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_mxname` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mxtarget` [INFO] [stdout] --> src/option.rs:141:5 [INFO] [stdout] | [INFO] [stdout] 141 | mxtarget: &Option<&mut String>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mxtarget` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lease_file` [INFO] [stdout] --> src/option.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | lease_file: &Option<&str>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_lease_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `username` [INFO] [stdout] --> src/option.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 143 | username: &str, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_username` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `groupname` [INFO] [stdout] --> src/option.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 144 | groupname: &str, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_groupname` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `domain_suffix` [INFO] [stdout] --> src/option.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | domain_suffix: &Option, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_domain_suffix` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `runfile` [INFO] [stdout] --> src/option.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | runfile: Option<&str>, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_runfile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `if_names` [INFO] [stdout] --> src/option.rs:147:5 [INFO] [stdout] | [INFO] [stdout] 147 | if_names: &Option>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_names` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `if_addrs` [INFO] [stdout] --> src/option.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | if_addrs: &Option>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_addrs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `if_except` [INFO] [stdout] --> src/option.rs:149:5 [INFO] [stdout] | [INFO] [stdout] 149 | if_except: &Option>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_except` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bogus_addr` [INFO] [stdout] --> src/option.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | bogus_addr: &Option>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_bogus_addr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `serv_addrs` [INFO] [stdout] --> src/option.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | serv_addrs: &Option>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_serv_addrs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cachesize` [INFO] [stdout] --> src/option.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | cachesize: Option<&mut usize>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cachesize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `port` [INFO] [stdout] --> src/option.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | port: Option<&mut u16>, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_port` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `query_port` [INFO] [stdout] --> src/option.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 154 | query_port: Option<&mut i32>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_query_port` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `local_ttl` [INFO] [stdout] --> src/option.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | local_ttl: Option<&mut u64>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_local_ttl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `addn_hosts` [INFO] [stdout] --> src/option.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | addn_hosts: &Option<&mut String>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_addn_hosts` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp` [INFO] [stdout] --> src/option.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | dhcp: &Option>, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_conf` [INFO] [stdout] --> src/option.rs:158:5 [INFO] [stdout] | [INFO] [stdout] 158 | dhcp_conf: &Option>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_conf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `opts` [INFO] [stdout] --> src/option.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | opts: Option>, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_opts` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_file` [INFO] [stdout] --> src/option.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | dhcp_file: Option<&mut String>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_sname` [INFO] [stdout] --> src/option.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | dhcp_sname: Option<&mut String>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_sname` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dhcp_next_server` [INFO] [stdout] --> src/option.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | dhcp_next_server: Ipv4Addr, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dhcp_next_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/util.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | assert_eq!(hostname_isequal("Rust", "rust"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 134 - assert_eq!(hostname_isequal("Rust", "rust"), true); [INFO] [stdout] 134 + assert!(hostname_isequal("Rust", "rust")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/util.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | assert_eq!(hostname_isequal("Rust", "Rust"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 135 - assert_eq!(hostname_isequal("Rust", "Rust"), true); [INFO] [stdout] 135 + assert!(hostname_isequal("Rust", "Rust")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/util.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | assert_eq!(hostname_isequal("Rust", "rusty"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 136 - assert_eq!(hostname_isequal("Rust", "rusty"), false); [INFO] [stdout] 136 + assert!(!hostname_isequal("Rust", "rusty")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/util.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | assert_eq!(hostname_isequal("Rust", "Ru"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 137 - assert_eq!(hostname_isequal("Rust", "Ru"), false); [INFO] [stdout] 137 + assert!(!hostname_isequal("Rust", "Ru")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/util.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | assert_eq!(hostname_isequal("Rust", "r"), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 138 - assert_eq!(hostname_isequal("Rust", "r"), false); [INFO] [stdout] 138 + assert!(!hostname_isequal("Rust", "r")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/util.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | assert_eq!(hostname_isequal("R", "r"), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 139 - assert_eq!(hostname_isequal("R", "r"), true); [INFO] [stdout] 139 + assert!(hostname_isequal("R", "r")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | &mut lease_file, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 158 - &mut lease_file, [INFO] [stdout] 158 + &lease_file, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | &mut username, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 159 - &mut username, [INFO] [stdout] 159 + &username, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | &mut groupname, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 160 - &mut groupname, [INFO] [stdout] 160 + &groupname, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | &mut dhcp_conf, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 174 - &mut dhcp_conf, [INFO] [stdout] 174 + &dhcp_conf, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | &mut username, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `username` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | &mut groupname, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `groupname` [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: manual implementation of `ok` [INFO] [stdout] --> src/main.rs:268:37 [INFO] [stdout] | [INFO] [stdout] 268 | let pidfile: Option = match File::create("pidfile.txt") { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 269 | | Ok(file) => Some(file), [INFO] [stdout] 270 | | Err(_) => None, [INFO] [stdout] 271 | | }; [INFO] [stdout] | |_________^ help: replace with: `File::create("pidfile.txt").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:317:17 [INFO] [stdout] | [INFO] [stdout] 317 | / if !found_in_dhcp { [INFO] [stdout] 318 | | if !(dhcp.is_none() && i == leasefd) { [INFO] [stdout] 319 | | let _ = close(i); [INFO] [stdout] 320 | | } [INFO] [stdout] 321 | | } [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] 317 ~ if !found_in_dhcp [INFO] [stdout] 318 ~ && !(dhcp.is_none() && i == leasefd) { [INFO] [stdout] 319 | let _ = close(i); [INFO] [stdout] 320 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | let mut leasefd = lease_init( [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | let mut laster_server = servers.clone(); [INFO] [stdout] | ----^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `serverfdp` [INFO] [stdout] --> src/main.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | let serverfdp: Option> = None; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_serverfdp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leasefd` [INFO] [stdout] --> src/main.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | let mut leasefd = lease_init( [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_leasefd` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pidfile` [INFO] [stdout] --> src/main.rs:268:13 [INFO] [stdout] | [INFO] [stdout] 268 | let pidfile: Option = match File::create("pidfile.txt") { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pidfile` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dnamebuff` [INFO] [stdout] --> src/main.rs:387:13 [INFO] [stdout] | [INFO] [stdout] 387 | let dnamebuff = config.start.to_string(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dnamebuff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `packet` [INFO] [stdout] --> src/main.rs:390:13 [INFO] [stdout] | [INFO] [stdout] 390 | let packet = if config.lease_time == 0 { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_packet` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `laster_server` [INFO] [stdout] --> src/main.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | let mut laster_server = servers.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_laster_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `last_server` [INFO] [stdout] --> src/main.rs:642:33 [INFO] [stdout] | [INFO] [stdout] 642 | ... let last_server = servers.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_server` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `now` is never read [INFO] [stdout] --> src/main.rs:98:31 [INFO] [stdout] | [INFO] [stdout] 98 | let mut now: SystemTime = SystemTime::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `source`, `fd`, and `time` are never read [INFO] [stdout] --> src/forward_init.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct FRec { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 12 | source: MySockAddr, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | fd: i32, [INFO] [stdout] | ^^ [INFO] [stdout] 17 | time: std::time::SystemTime, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/main.rs:582:12 [INFO] [stdout] | [INFO] [stdout] 582 | if last.map_or(true, |last_time| { [INFO] [stdout] | ____________^ [INFO] [stdout] 583 | | now.duration_since(last_time).unwrap_or(Duration::ZERO) > Duration::from_secs(1) [INFO] [stdout] 584 | | }) { [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 582 - if last.map_or(true, |last_time| { [INFO] [stdout] 582 + if last.is_none_or(|last_time| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/main.rs:695:19 [INFO] [stdout] | [INFO] [stdout] 695 | .pid_file(RUNFILE.expect("REASON").to_string()) // 设置 PID 文件的路径 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `RUNFILE.expect("REASON")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` 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/cache.rs:229:67 [INFO] [stdout] | [INFO] [stdout] 229 | if let Err(err) = read_hostsfile(caches, HOSTSFILE, opts, &mut buff, &mut domain_suffix, 0) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `buff` [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/cache.rs:241:13 [INFO] [stdout] | [INFO] [stdout] 241 | &mut buff, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `buff` [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: creating a shared reference to mutable static [INFO] [stdout] --> src/cache.rs:1161:26 [INFO] [stdout] | [INFO] [stdout] 1161 | source = ADDN_FILE.as_deref().unwrap_or("default_file"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/cache.rs:389:19 [INFO] [stdout] | [INFO] [stdout] 389 | val += if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 389 - val += if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] 389 + val += if c.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/cache.rs:390:17 [INFO] [stdout] | [INFO] [stdout] 390 | c + (b'a' - b'A') as u8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(b'a' - b'A')` [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: creating a mutable reference to mutable static [INFO] [stdout] --> src/forward_init.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | let mut current = &mut FREC_LIST; [INFO] [stdout] | ^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 32 | let mut current = &raw mut FREC_LIST; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:182:12 [INFO] [stdout] | [INFO] [stdout] 182 | if FILE_DIRTY.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:194:33 [INFO] [stdout] | [INFO] [stdout] 194 | let mut lease_opt = LEASES.as_deref(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:231:12 [INFO] [stdout] | [INFO] [stdout] 231 | if DNS_DIRTY.is_some() || force_dns != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:234:33 [INFO] [stdout] | [INFO] [stdout] 234 | let mut lease_opt = LEASES.as_deref(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/cache.rs:490:59 [INFO] [stdout] | [INFO] [stdout] 490 | Cache::cache_link(cache, unsafe { &mut *Box::from_raw(current_ptr) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut Box::from_raw(current_ptr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unsafe function's docs are missing a `# Safety` section [INFO] [stdout] --> src/cache.rs:600:1 [INFO] [stdout] | [INFO] [stdout] 600 | pub unsafe fn cache_free(cache: &mut Cache, crecp: *mut Crec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc [INFO] [stdout] = note: `#[warn(clippy::missing_safety_doc)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/cache.rs:983:20 [INFO] [stdout] | [INFO] [stdout] 983 | let name_str = match str::from_utf8(name) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 984 | | Ok(valid_str) => Some(valid_str), [INFO] [stdout] 985 | | Err(_) => None, // 如果转换失败,忽略此字符串 [INFO] [stdout] 986 | | }; [INFO] [stdout] | |_____^ help: replace with: `str::from_utf8(name).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Result::unwrap_or` [INFO] [stdout] --> src/cache.rs:1105:20 [INFO] [stdout] | [INFO] [stdout] 1105 | let name_str = match str::from_utf8(name) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 1106 | | Ok(valid_str) => valid_str, [INFO] [stdout] 1107 | | Err(_) => "", [INFO] [stdout] 1108 | | }; [INFO] [stdout] | |_____^ help: replace with: `str::from_utf8(name).unwrap_or("")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dhcp.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | / if config.clid_len == clid_len && config.clid == clid { [INFO] [stdout] 27 | | if is_addr_in_context(context, config) { [INFO] [stdout] 28 | | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [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] 26 ~ if config.clid_len == clid_len && config.clid == clid [INFO] [stdout] 27 ~ && is_addr_in_context(context, config) { [INFO] [stdout] 28 | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 29 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dhcp.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] { [INFO] [stdout] 34 | | if is_addr_in_context(context, config) { [INFO] [stdout] 35 | | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 36 | | } [INFO] [stdout] 37 | | } [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] 33 ~ if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] [INFO] [stdout] 34 ~ && is_addr_in_context(context, config) { [INFO] [stdout] 35 | return Some(config.clone()); // 返回匹配的配置 [INFO] [stdout] 36 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/dhcp.rs:33:67 [INFO] [stdout] | [INFO] [stdout] 33 | if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 33 - if clid[0] == 0 && config.clid_len == clid_len - 1 && &config.clid[..] == &clid[1..] { [INFO] [stdout] 33 + if clid[0] == 0 && config.clid_len == clid_len - 1 && config.clid[..] == clid[1..] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/forward_init.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / pub fn reply_query( [INFO] [stdout] 42 | | fd: i32, [INFO] [stdout] 43 | | options: u32, [INFO] [stdout] 44 | | packet: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 49 | | caches: &mut Cache, [INFO] [stdout] 50 | | ) -> Option> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/forward_init.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | / if opcode == 0 { [INFO] [stdout] 82 | | if !(bogus_nxdomain.is_some() [INFO] [stdout] 83 | | && rcode == 0 [INFO] [stdout] 84 | | && check_for_bogus_wildcard( [INFO] [stdout] ... | [INFO] [stdout] 100 | | } [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 opcode == 0 [INFO] [stdout] 82 ~ && !(bogus_nxdomain.is_some() [INFO] [stdout] 83 | && rcode == 0 [INFO] [stdout] ... [INFO] [stdout] 98 | } [INFO] [stdout] 99 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/forward_init.rs:107:20 [INFO] [stdout] | [INFO] [stdout] 107 | if let Err(_) = socket.send_to(&packet[..n], src_addr) { [INFO] [stdout] | -------^^^^^^----------------------------------------- help: try: `if socket.send_to(&packet[..n], src_addr).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | LOG.set_formatter(s.as_str()).uselog(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] = note: `#[warn(clippy::borrow_interior_mutable_const)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | LOG.set_cutmode_by_time(LOG_FILE, MODE::MONTH, 0, false); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | LOG.set_level(tklog::LEVEL::Debug); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: borrow of a named constant with interior mutability [INFO] [stdout] --> src/logs.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | LOG.set_printmode(tklog::PRINTMODE::PUNCTUAL); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: there is a compiler inserted call to `Deref::deref` here [INFO] [stdout] = help: this lint can be silenced by assigning the value to a local variable before borrowing [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/network.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | if current_name [INFO] [stdout] | ________________^ [INFO] [stdout] 36 | | .name [INFO] [stdout] 37 | | .as_ref() [INFO] [stdout] 38 | | .map_or(false, |n| n.as_str() == name) [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 38 - .map_or(false, |n| n.as_str() == name) [INFO] [stdout] 38 + .is_some_and(|n| n.as_str() == name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/network.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if tmp.is_none() { [INFO] [stdout] 65 | | return None; [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ help: replace it with: `tmp.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/network.rs:72:16 [INFO] [stdout] | [INFO] [stdout] 72 | if current_except [INFO] [stdout] | ________________^ [INFO] [stdout] 73 | | .name [INFO] [stdout] 74 | | .as_ref() [INFO] [stdout] 75 | | .map_or(false, |n| n.as_str() == name) [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 75 - .map_or(false, |n| n.as_str() == name) [INFO] [stdout] 75 + .is_some_and(|n| n.as_str() == name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/network.rs:176:46 [INFO] [stdout] | [INFO] [stdout] 176 | if iface.name != "lo" && !(flags & (0x8 | 0x10) != 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(flags & (0x8 | 0x10) == 0)` [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 function has too many arguments (27/7) [INFO] [stdout] --> src/option.rs:135:1 [INFO] [stdout] | [INFO] [stdout] 135 | / pub fn read_opts( [INFO] [stdout] 136 | | argc: usize, [INFO] [stdout] 137 | | argv: Vec, [INFO] [stdout] 138 | | buff: &mut [u8], [INFO] [stdout] ... | [INFO] [stdout] 162 | | dhcp_next_server: Ipv4Addr, [INFO] [stdout] 163 | | ) -> u32 { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `p.get(0)` [INFO] [stdout] --> src/rfc1035.rs:180:26 [INFO] [stdout] | [INFO] [stdout] 180 | while let Some(&l) = p.get(0) { [INFO] [stdout] | ^^^^^^^^ help: try: `p.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/rfc1035.rs:185:16 [INFO] [stdout] | [INFO] [stdout] 185 | if p.len() < 1 || p.as_ptr() as usize - header.as_ptr() as usize + 1 >= plen { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.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: length comparison to one [INFO] [stdout] --> src/rfc1035.rs:210:16 [INFO] [stdout] | [INFO] [stdout] 210 | if p.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | &mut lease_file, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 158 - &mut lease_file, [INFO] [stdout] 158 + &lease_file, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | &mut username, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 159 - &mut username, [INFO] [stdout] 159 + &username, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | &mut groupname, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 160 - &mut groupname, [INFO] [stdout] 160 + &groupname, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `read_opts` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | &mut dhcp_conf, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 174 - &mut dhcp_conf, [INFO] [stdout] 174 + &dhcp_conf, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | &mut username, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `username` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | &mut groupname, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `groupname` [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: manual implementation of `ok` [INFO] [stdout] --> src/main.rs:268:37 [INFO] [stdout] | [INFO] [stdout] 268 | let pidfile: Option = match File::create("pidfile.txt") { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 269 | | Ok(file) => Some(file), [INFO] [stdout] 270 | | Err(_) => None, [INFO] [stdout] 271 | | }; [INFO] [stdout] | |_________^ help: replace with: `File::create("pidfile.txt").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:317:17 [INFO] [stdout] | [INFO] [stdout] 317 | / if !found_in_dhcp { [INFO] [stdout] 318 | | if !(dhcp.is_none() && i == leasefd) { [INFO] [stdout] 319 | | let _ = close(i); [INFO] [stdout] 320 | | } [INFO] [stdout] 321 | | } [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] 317 ~ if !found_in_dhcp [INFO] [stdout] 318 ~ && !(dhcp.is_none() && i == leasefd) { [INFO] [stdout] 319 | let _ = close(i); [INFO] [stdout] 320 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/main.rs:582:12 [INFO] [stdout] | [INFO] [stdout] 582 | if last.map_or(true, |last_time| { [INFO] [stdout] | ____________^ [INFO] [stdout] 583 | | now.duration_since(last_time).unwrap_or(Duration::ZERO) > Duration::from_secs(1) [INFO] [stdout] 584 | | }) { [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 582 - if last.map_or(true, |last_time| { [INFO] [stdout] 582 + if last.is_none_or(|last_time| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/main.rs:695:19 [INFO] [stdout] | [INFO] [stdout] 695 | .pid_file(RUNFILE.expect("REASON").to_string()) // 设置 PID 文件的路径 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `RUNFILE.expect("REASON")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/cache.rs:1161:26 [INFO] [stdout] | [INFO] [stdout] 1161 | source = ADDN_FILE.as_deref().unwrap_or("default_file"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/forward_init.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | let mut current = &mut FREC_LIST; [INFO] [stdout] | ^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 32 | let mut current = &raw mut FREC_LIST; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:182:12 [INFO] [stdout] | [INFO] [stdout] 182 | if FILE_DIRTY.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:194:33 [INFO] [stdout] | [INFO] [stdout] 194 | let mut lease_opt = LEASES.as_deref(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:231:12 [INFO] [stdout] | [INFO] [stdout] 231 | if DNS_DIRTY.is_some() || force_dns != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lease.rs:234:33 [INFO] [stdout] | [INFO] [stdout] 234 | let mut lease_opt = LEASES.as_deref(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 16.39s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: daemonize v0.4.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2` [INFO] running `Command { std: "docker" "inspect" "1a4eaf34b9450543da146c4855fda33f6a9c948ad2116ed76187d907f0141b13", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1a4eaf34b9450543da146c4855fda33f6a9c948ad2116ed76187d907f0141b13", kill_on_drop: false }` [INFO] [stdout] 1a4eaf34b9450543da146c4855fda33f6a9c948ad2116ed76187d907f0141b13