[INFO] cloning repository https://github.com/proregmao/v2ray_dns [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/proregmao/v2ray_dns" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fproregmao%2Fv2ray_dns", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fproregmao%2Fv2ray_dns'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 699c1103ea2fb668f0678f851908e43f6053dc33 [INFO] testing proregmao/v2ray_dns against try#dec9417b8611e34e787a3e4c37686b5131f9e5c5 for pr-154210-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fproregmao%2Fv2ray_dns" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/proregmao/v2ray_dns [INFO] removed 0 missing examples [INFO] finished tweaking git repo https://github.com/proregmao/v2ray_dns [INFO] tweaked toml for git repo https://github.com/proregmao/v2ray_dns written to /workspace/builds/worker-7-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/proregmao/v2ray_dns on toolchain dec9417b8611e34e787a3e4c37686b5131f9e5c5 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/proregmao/v2ray_dns already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/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" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ba82ff4892b5f527fff5b75f0bc94eb6759b5f7e2a89ae51b7f0420daf8e3c4b [INFO] running `Command { std: "docker" "start" "-a" "ba82ff4892b5f527fff5b75f0bc94eb6759b5f7e2a89ae51b7f0420daf8e3c4b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ba82ff4892b5f527fff5b75f0bc94eb6759b5f7e2a89ae51b7f0420daf8e3c4b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ba82ff4892b5f527fff5b75f0bc94eb6759b5f7e2a89ae51b7f0420daf8e3c4b", kill_on_drop: false }` [INFO] [stdout] ba82ff4892b5f527fff5b75f0bc94eb6759b5f7e2a89ae51b7f0420daf8e3c4b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/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" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 76ad4ba469a55483b1b6e34b376cee7a5a42974dee267a721e79d883545a39bd [INFO] running `Command { std: "docker" "start" "-a" "76ad4ba469a55483b1b6e34b376cee7a5a42974dee267a721e79d883545a39bd", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.19 [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Compiling libc v0.2.176 [INFO] [stderr] Compiling cfg-if v1.0.3 [INFO] [stderr] Compiling futures-channel v0.3.31 [INFO] [stderr] Compiling find-msvc-tools v0.1.3 [INFO] [stderr] Compiling zerocopy v0.8.27 [INFO] [stderr] Compiling hashbrown v0.16.0 [INFO] [stderr] Compiling log v0.4.28 [INFO] [stderr] Compiling unicode-normalization v0.1.24 [INFO] [stderr] Compiling aho-corasick v1.1.3 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Compiling regex-syntax v0.8.6 [INFO] [stderr] Compiling nibble_vec v0.1.0 [INFO] [stderr] Compiling winnow v0.5.40 [INFO] [stderr] Compiling anstyle-query v1.1.4 [INFO] [stderr] Compiling endian-type v0.1.2 [INFO] [stderr] Compiling deranged v0.5.4 [INFO] [stderr] Compiling cc v1.2.40 [INFO] [stderr] Compiling radix_trie v0.2.1 [INFO] [stderr] Compiling anstream v0.6.21 [INFO] [stderr] Compiling num-conv v0.1.0 [INFO] [stderr] Compiling idna v0.4.0 [INFO] [stderr] Compiling time-core v0.1.6 [INFO] [stderr] Compiling anyhow v1.0.100 [INFO] [stderr] Compiling hashbrown v0.15.5 [INFO] [stderr] Compiling clap_builder v4.5.48 [INFO] [stderr] Compiling tracing-log v0.2.0 [INFO] [stderr] Compiling encoding_rs v0.8.35 [INFO] [stderr] Compiling thread_local v1.1.9 [INFO] [stderr] Compiling iana-time-zone v0.1.64 [INFO] [stderr] Compiling indexmap v2.11.4 [INFO] [stderr] Compiling bitflags v2.9.4 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling unsafe-libyaml v0.2.11 [INFO] [stderr] Compiling nu-ansi-term v0.50.1 [INFO] [stderr] Compiling lru v0.12.5 [INFO] [stderr] Compiling arc-swap v1.7.1 [INFO] [stderr] Compiling cidr v0.2.3 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling mio v1.0.4 [INFO] [stderr] Compiling signal-hook-registry v1.4.6 [INFO] [stderr] Compiling parking_lot v0.12.5 [INFO] [stderr] Compiling socket2 v0.6.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling regex-automata v0.4.11 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling socket2 v0.5.10 [INFO] [stderr] Compiling dirs-sys v0.4.1 [INFO] [stderr] Compiling nix v0.27.1 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling time v0.3.44 [INFO] [stderr] Compiling num_cpus v1.17.0 [INFO] [stderr] Compiling dirs v5.0.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Compiling matchers v0.2.0 [INFO] [stderr] Compiling regex v1.11.3 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling enum-as-inner v0.6.1 [INFO] [stderr] Compiling clap_derive v4.5.47 [INFO] [stderr] Compiling rustls-webpki v0.101.7 [INFO] [stderr] Compiling sct v0.7.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling tokio v1.47.1 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling tracing v0.1.41 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling yoke v0.8.0 [INFO] [stderr] Compiling clap v4.5.48 [INFO] [stderr] Compiling zerovec v0.11.4 [INFO] [stderr] Compiling zerotrie v0.2.2 [INFO] [stderr] Compiling tinystr v0.8.1 [INFO] [stderr] Compiling potential_utf v0.1.3 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling icu_collections v2.0.0 [INFO] [stderr] Compiling icu_locale_core v2.0.0 [INFO] [stderr] Compiling toml_datetime v0.6.11 [INFO] [stderr] Compiling serde_spanned v0.6.9 [INFO] [stderr] Compiling tracing-serde v0.2.0 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Compiling chrono v0.4.42 [INFO] [stderr] Compiling serde_yaml v0.9.34+deprecated [INFO] [stderr] Compiling toml_edit v0.19.15 [INFO] [stderr] Compiling tracing-subscriber v0.3.20 [INFO] [stderr] Compiling icu_provider v2.0.0 [INFO] [stderr] Compiling icu_properties v2.0.1 [INFO] [stderr] Compiling icu_normalizer v2.0.0 [INFO] [stderr] Compiling futures-executor v0.3.31 [INFO] [stderr] Compiling futures v0.3.31 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Compiling idna v1.1.0 [INFO] [stderr] Compiling toml v0.7.8 [INFO] [stderr] Compiling url v2.5.7 [INFO] [stderr] Compiling tokio-util v0.7.16 [INFO] [stderr] Compiling tokio-rustls v0.24.1 [INFO] [stderr] Compiling drain v0.1.2 [INFO] [stderr] Compiling trust-dns-proto v0.23.2 [INFO] [stderr] Compiling hickory-proto v0.24.4 [INFO] [stderr] Compiling h2 v0.3.27 [INFO] [stderr] Compiling hickory-client v0.24.4 [INFO] [stderr] Compiling hyper v0.14.32 [INFO] [stderr] Compiling trust-dns-client v0.23.2 [INFO] [stderr] Compiling trust-dns-server v0.23.2 [INFO] [stderr] Compiling hyper-rustls v0.24.2 [INFO] [stderr] Compiling reqwest v0.11.27 [INFO] [stderr] Compiling smart-dns-server v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/lib.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/cli/mod.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/launcher/mod.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, error, warn}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/system/port_manager.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio::time::timeout` [INFO] [stdout] --> src/system/port_manager.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use tokio::time::timeout; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/port_manager.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/system/port_manager.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/iptables.rs:6:34 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/dns_manager.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/system/problem_solver.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/problem_solver.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Ipv4Addr` [INFO] [stdout] --> src/system/problem_solver.rs:8:24 [INFO] [stdout] | [INFO] [stdout] 8 | use std::net::{IpAddr, Ipv4Addr}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/dns/handler.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Name` [INFO] [stdout] --> src/dns/simple_server.rs:9:54 [INFO] [stdout] | [INFO] [stdout] 9 | use trust_dns_proto::rr::{RecordType, RData, Record, Name}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `trust_dns_proto::rr::RecordType` [INFO] [stdout] --> src/dns/optimized_server.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use trust_dns_proto::rr::RecordType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DomainCategory` [INFO] [stdout] --> src/dns/optimized_server.rs:17:62 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::classifier::domain_classifier::{DomainClassifier, DomainCategory}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/classifier/domain_classifier.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RulePriority` [INFO] [stdout] --> src/classifier/domain_classifier.rs:11:62 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::classifier::rules::{ClassificationRule, RuleType, RulePriority}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `debug` and `error` [INFO] [stdout] --> src/classifier/geosite.rs:7:27 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/upstream/manager.rs:10:34 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/upstream/pool.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | use tracing::{info, warn, error, debug, instrument}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::seq::SliceRandom` [INFO] [stdout] --> src/upstream/pool.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use rand::seq::SliceRandom; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `error` and `info` [INFO] [stdout] --> src/upstream/encrypted_dns.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RData` [INFO] [stdout] --> src/upstream/encrypted_dns.rs:6:39 [INFO] [stdout] | [INFO] [stdout] 6 | use trust_dns_proto::rr::{RecordType, RData}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Ipv6Addr` [INFO] [stdout] --> src/validator/expected_ip.rs:5:34 [INFO] [stdout] | [INFO] [stdout] 5 | use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/validator/expected_ip.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/validator/expected_ip.rs:8:22 [INFO] [stdout] | [INFO] [stdout] 8 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cache/ttl.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | use tracing::{debug, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/cache/safe_cache.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cache/safe_cache.rs:10:28 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing::{debug, info, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/utils/logging.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/utils/network.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/dns/server.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 183 | return Ok(()); [INFO] [stdout] | ------------- any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 199 | self.cleanup().await?; [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/dns/handler.rs:137:35 [INFO] [stdout] | [INFO] [stdout] 137 | async fn process_query(&self, mut request: Message) -> Result { [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: variable does not need to be mutable [INFO] [stdout] --> src/upstream/pool.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 179 | let mut servers = healthy_servers; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/config/mod.rs:284:34 [INFO] [stdout] | [INFO] [stdout] 284 | pub fn merge_with(&mut self, other: &SmartDnsConfig) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `domain` [INFO] [stdout] --> src/system/problem_solver.rs:291:38 [INFO] [stdout] | [INFO] [stdout] 291 | async fn query_dns_server(&self, domain: &str, dns_server: &str) -> Result> { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_domain` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/dns/handler.rs:262:37 [INFO] [stdout] | [INFO] [stdout] 262 | fn create_error_response(&self, mut request: Message, error_code: ResponseCode) -> Result { [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ips` [INFO] [stdout] --> src/dns/optimized_server.rs:261:45 [INFO] [stdout] | [INFO] [stdout] 261 | fn create_dns_response(query: &Message, ips: Vec) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ips` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/cache/lru_cache.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | unsafe { [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_unsafe)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/cache/safe_cache.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(mut record) = cache.get_mut(domain) { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env_filter` [INFO] [stdout] --> src/utils/logging.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | let env_filter = EnvFilter::new(level); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_env_filter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `config` is never read [INFO] [stdout] --> src/system/problem_solver.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct SystemProblemSolver { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] 15 | config: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `query_servers`, `query_servers_concurrent`, and `query_single_server_static` are never used [INFO] [stdout] --> src/upstream/manager.rs:329:14 [INFO] [stdout] | [INFO] [stdout] 105 | impl UpstreamDnsManager { [INFO] [stdout] | ----------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 329 | async fn query_servers(&self, request: &Message, servers: &[SocketAddr]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 406 | async fn query_servers_concurrent(&self, request: &Message, servers: &[SocketAddr]) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 442 | async fn query_single_server_static( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `timeout` is never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct EncryptedDnsClient { [INFO] [stdout] | ------------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 22 | timeout: Duration, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `EncryptedDnsClient` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `status` is never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 143 | struct DoHResponse { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 144 | #[serde(rename = "Status")] [INFO] [stdout] 145 | status: Option, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DoHResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `record_type` are never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 152 | struct DoHAnswer { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 153 | #[serde(rename = "name")] [INFO] [stdout] 154 | name: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] 155 | #[serde(rename = "type")] [INFO] [stdout] 156 | record_type: Option, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DoHAnswer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `alert_states` is never read [INFO] [stdout] --> src/stats/monitor.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct SystemMonitor { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | alert_states: AlertStates, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SystemMonitor` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `cpu_alert_active`, `memory_alert_active`, `dns_success_rate_alert_active`, `cache_hit_rate_alert_active`, and `response_time_alert_active` are never read [INFO] [stdout] --> src/stats/monitor.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 96 | struct AlertStates { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 97 | cpu_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 98 | memory_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 99 | dns_success_rate_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 100 | cache_hit_rate_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 101 | response_time_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AlertStates` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/config/mod.rs:186:29 [INFO] [stdout] | [INFO] [stdout] 186 | if port == 0 || port > 65535 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 133 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 159 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 198 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/simple_main.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let mut dns_server = SimpleDnsServer::new(config).await [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: field `config` is never read [INFO] [stdout] --> src/simple_optimized_main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 22 | struct AppState { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | config: SmartDnsConfig, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_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/optimized_main.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | let mut dns_server = OptimizedDnsServer::new(server_config).await [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: field `config` is never read [INFO] [stdout] --> src/optimized_main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 22 | struct AppState { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | config: SmartDnsConfig, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dns_server_clone` [INFO] [stdout] --> src/reliable_main.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | let dns_server_clone = dns_server.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dns_server_clone` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_network_connectivity` is never used [INFO] [stdout] --> src/reliable_main.rs:216:10 [INFO] [stdout] | [INFO] [stdout] 216 | async fn test_network_connectivity() -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_dns_resolution` is never used [INFO] [stdout] --> src/reliable_main.rs:237:10 [INFO] [stdout] | [INFO] [stdout] 237 | async fn test_dns_resolution() -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `port` is never used [INFO] [stdout] --> src/reliable_dns_server.rs:386:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl ReliableDnsServer { [INFO] [stdout] | ---------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 386 | pub fn port(&self) -> u16 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 36s [INFO] running `Command { std: "docker" "inspect" "76ad4ba469a55483b1b6e34b376cee7a5a42974dee267a721e79d883545a39bd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "76ad4ba469a55483b1b6e34b376cee7a5a42974dee267a721e79d883545a39bd", kill_on_drop: false }` [INFO] [stdout] 76ad4ba469a55483b1b6e34b376cee7a5a42974dee267a721e79d883545a39bd [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/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" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 470e76d68bd9ac73b88254770239cab731667a7302592af837d8df2abf98f3ec [INFO] running `Command { std: "docker" "start" "-a" "470e76d68bd9ac73b88254770239cab731667a7302592af837d8df2abf98f3ec", kill_on_drop: false }` [INFO] [stderr] Compiling tokio v1.47.1 [INFO] [stderr] Compiling bitflags v2.9.4 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Compiling linux-raw-sys v0.11.0 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling nix v0.27.1 [INFO] [stderr] Compiling async-stream v0.3.6 [INFO] [stderr] Compiling tempfile v3.23.0 [INFO] [stderr] Compiling tokio-util v0.7.16 [INFO] [stderr] Compiling trust-dns-proto v0.23.2 [INFO] [stderr] Compiling tokio-rustls v0.24.1 [INFO] [stderr] Compiling hickory-proto v0.24.4 [INFO] [stderr] Compiling drain v0.1.2 [INFO] [stderr] Compiling tokio-stream v0.1.17 [INFO] [stderr] Compiling tokio-test v0.4.4 [INFO] [stderr] Compiling h2 v0.3.27 [INFO] [stderr] Compiling hyper v0.14.32 [INFO] [stderr] Compiling hickory-client v0.24.4 [INFO] [stderr] Compiling trust-dns-client v0.23.2 [INFO] [stderr] Compiling trust-dns-server v0.23.2 [INFO] [stderr] Compiling hyper-rustls v0.24.2 [INFO] [stderr] Compiling reqwest v0.11.27 [INFO] [stderr] Compiling smart-dns-server v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/lib.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/cli/mod.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/launcher/mod.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, error, warn}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/system/port_manager.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio::time::timeout` [INFO] [stdout] --> src/system/port_manager.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use tokio::time::timeout; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/port_manager.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/system/port_manager.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/iptables.rs:6:34 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/dns_manager.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/system/problem_solver.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/problem_solver.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Ipv4Addr` [INFO] [stdout] --> src/system/problem_solver.rs:8:24 [INFO] [stdout] | [INFO] [stdout] 8 | use std::net::{IpAddr, Ipv4Addr}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/dns/handler.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Name` [INFO] [stdout] --> src/dns/simple_server.rs:9:54 [INFO] [stdout] | [INFO] [stdout] 9 | use trust_dns_proto::rr::{RecordType, RData, Record, Name}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `trust_dns_proto::rr::RecordType` [INFO] [stdout] --> src/dns/optimized_server.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use trust_dns_proto::rr::RecordType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DomainCategory` [INFO] [stdout] --> src/dns/optimized_server.rs:17:62 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::classifier::domain_classifier::{DomainClassifier, DomainCategory}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/classifier/domain_classifier.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RulePriority` [INFO] [stdout] --> src/classifier/domain_classifier.rs:11:62 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::classifier::rules::{ClassificationRule, RuleType, RulePriority}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `debug` and `error` [INFO] [stdout] --> src/classifier/geosite.rs:7:27 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/upstream/manager.rs:10:34 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/upstream/pool.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | use tracing::{info, warn, error, debug, instrument}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::seq::SliceRandom` [INFO] [stdout] --> src/upstream/pool.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use rand::seq::SliceRandom; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `error` and `info` [INFO] [stdout] --> src/upstream/encrypted_dns.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RData` [INFO] [stdout] --> src/upstream/encrypted_dns.rs:6:39 [INFO] [stdout] | [INFO] [stdout] 6 | use trust_dns_proto::rr::{RecordType, RData}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Ipv6Addr` [INFO] [stdout] --> src/validator/expected_ip.rs:5:34 [INFO] [stdout] | [INFO] [stdout] 5 | use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/validator/expected_ip.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/validator/expected_ip.rs:8:22 [INFO] [stdout] | [INFO] [stdout] 8 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cache/ttl.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | use tracing::{debug, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/cache/safe_cache.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cache/safe_cache.rs:10:28 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing::{debug, info, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/utils/logging.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/utils/network.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/dns/server.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 183 | return Ok(()); [INFO] [stdout] | ------------- any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 199 | self.cleanup().await?; [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/dns/handler.rs:137:35 [INFO] [stdout] | [INFO] [stdout] 137 | async fn process_query(&self, mut request: Message) -> Result { [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: variable does not need to be mutable [INFO] [stdout] --> src/upstream/pool.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 179 | let mut servers = healthy_servers; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/lib.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/cli/mod.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/launcher/mod.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, error, warn}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/system/port_manager.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio::time::timeout` [INFO] [stdout] --> src/system/port_manager.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use tokio::time::timeout; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/port_manager.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/system/port_manager.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio_test` [INFO] [stdout] --> src/system/port_manager.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | use tokio_test; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/iptables.rs:6:34 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/dns_manager.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/system/problem_solver.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/system/problem_solver.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Ipv4Addr` [INFO] [stdout] --> src/system/problem_solver.rs:8:24 [INFO] [stdout] | [INFO] [stdout] 8 | use std::net::{IpAddr, Ipv4Addr}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/dns/handler.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Name` [INFO] [stdout] --> src/dns/simple_server.rs:9:54 [INFO] [stdout] | [INFO] [stdout] 9 | use trust_dns_proto::rr::{RecordType, RData, Record, Name}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `trust_dns_proto::rr::RecordType` [INFO] [stdout] --> src/dns/optimized_server.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use trust_dns_proto::rr::RecordType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DomainCategory` [INFO] [stdout] --> src/dns/optimized_server.rs:17:62 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::classifier::domain_classifier::{DomainClassifier, DomainCategory}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/classifier/domain_classifier.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `debug` and `error` [INFO] [stdout] --> src/classifier/geosite.rs:7:27 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/upstream/manager.rs:10:34 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/upstream/pool.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | use tracing::{info, warn, error, debug, instrument}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::seq::SliceRandom` [INFO] [stdout] --> src/upstream/pool.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use rand::seq::SliceRandom; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `error` and `info` [INFO] [stdout] --> src/upstream/encrypted_dns.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RData` [INFO] [stdout] --> src/upstream/encrypted_dns.rs:6:39 [INFO] [stdout] | [INFO] [stdout] 6 | use trust_dns_proto::rr::{RecordType, RData}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Ipv6Addr` [INFO] [stdout] --> src/validator/expected_ip.rs:5:34 [INFO] [stdout] | [INFO] [stdout] 5 | use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/validator/expected_ip.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn, debug, error}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Context` [INFO] [stdout] --> src/validator/expected_ip.rs:8:22 [INFO] [stdout] | [INFO] [stdout] 8 | use anyhow::{Result, Context}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cache/ttl.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | use tracing::{debug, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/cache/safe_cache.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> src/cache/safe_cache.rs:10:28 [INFO] [stdout] | [INFO] [stdout] 10 | use tracing::{debug, info, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/utils/logging.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | use tracing::{info, warn, error, debug}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/utils/network.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/test_duration.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/config/mod.rs:284:34 [INFO] [stdout] | [INFO] [stdout] 284 | pub fn merge_with(&mut self, other: &SmartDnsConfig) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/dns/server.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 183 | return Ok(()); [INFO] [stdout] | ------------- any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 199 | self.cleanup().await?; [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: unused variable: `domain` [INFO] [stdout] --> src/system/problem_solver.rs:291:38 [INFO] [stdout] | [INFO] [stdout] 291 | async fn query_dns_server(&self, domain: &str, dns_server: &str) -> Result> { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_domain` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/dns/handler.rs:137:35 [INFO] [stdout] | [INFO] [stdout] 137 | async fn process_query(&self, mut request: Message) -> Result { [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: variable does not need to be mutable [INFO] [stdout] --> src/dns/handler.rs:262:37 [INFO] [stdout] | [INFO] [stdout] 262 | fn create_error_response(&self, mut request: Message, error_code: ResponseCode) -> Result { [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ips` [INFO] [stdout] --> src/dns/optimized_server.rs:261:45 [INFO] [stdout] | [INFO] [stdout] 261 | fn create_dns_response(query: &Message, ips: Vec) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ips` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/cache/lru_cache.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | unsafe { [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_unsafe)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/cache/safe_cache.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(mut record) = cache.get_mut(domain) { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env_filter` [INFO] [stdout] --> src/utils/logging.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | let env_filter = EnvFilter::new(level); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_env_filter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/upstream/pool.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 179 | let mut servers = healthy_servers; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `config` is never read [INFO] [stdout] --> src/system/problem_solver.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct SystemProblemSolver { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] 15 | config: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `query_servers`, `query_servers_concurrent`, and `query_single_server_static` are never used [INFO] [stdout] --> src/upstream/manager.rs:329:14 [INFO] [stdout] | [INFO] [stdout] 105 | impl UpstreamDnsManager { [INFO] [stdout] | ----------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 329 | async fn query_servers(&self, request: &Message, servers: &[SocketAddr]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 406 | async fn query_servers_concurrent(&self, request: &Message, servers: &[SocketAddr]) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 442 | async fn query_single_server_static( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `timeout` is never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct EncryptedDnsClient { [INFO] [stdout] | ------------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 22 | timeout: Duration, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `EncryptedDnsClient` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `status` is never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 143 | struct DoHResponse { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 144 | #[serde(rename = "Status")] [INFO] [stdout] 145 | status: Option, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DoHResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `record_type` are never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 152 | struct DoHAnswer { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 153 | #[serde(rename = "name")] [INFO] [stdout] 154 | name: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] 155 | #[serde(rename = "type")] [INFO] [stdout] 156 | record_type: Option, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DoHAnswer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `alert_states` is never read [INFO] [stdout] --> src/stats/monitor.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct SystemMonitor { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | alert_states: AlertStates, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SystemMonitor` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `cpu_alert_active`, `memory_alert_active`, `dns_success_rate_alert_active`, `cache_hit_rate_alert_active`, and `response_time_alert_active` are never read [INFO] [stdout] --> src/stats/monitor.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 96 | struct AlertStates { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 97 | cpu_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 98 | memory_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 99 | dns_success_rate_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 100 | cache_hit_rate_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 101 | response_time_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AlertStates` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/config/mod.rs:186:29 [INFO] [stdout] | [INFO] [stdout] 186 | if port == 0 || port > 65535 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 133 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 159 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 198 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/config/mod.rs:284:34 [INFO] [stdout] | [INFO] [stdout] 284 | pub fn merge_with(&mut self, other: &SmartDnsConfig) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/launcher/mod.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | let args = CliArgs { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/system/signal_handler.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | let mut shutdown = GracefulShutdown::new(); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cleanup_flag` [INFO] [stdout] --> src/system/signal_handler.rs:302:13 [INFO] [stdout] | [INFO] [stdout] 302 | let cleanup_flag = cleanup_executed.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cleanup_flag` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `domain` [INFO] [stdout] --> src/system/problem_solver.rs:291:38 [INFO] [stdout] | [INFO] [stdout] 291 | async fn query_dns_server(&self, domain: &str, dns_server: &str) -> Result> { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_domain` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/dns/handler.rs:262:37 [INFO] [stdout] | [INFO] [stdout] 262 | fn create_error_response(&self, mut request: Message, error_code: ResponseCode) -> Result { [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ips` [INFO] [stdout] --> src/dns/optimized_server.rs:261:45 [INFO] [stdout] | [INFO] [stdout] 261 | fn create_dns_response(query: &Message, ips: Vec) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ips` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `warn` [INFO] [stdout] --> examples/domain_classifier_demo.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | use tracing::{info, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/simple_main.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let mut dns_server = SimpleDnsServer::new(config).await [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 import: `GeoSiteDatabase` [INFO] [stdout] --> examples/real_dns_server.rs:8:70 [INFO] [stdout] | [INFO] [stdout] 8 | use smart_dns_server::classifier::{DomainClassifier, DomainCategory, GeoSiteDatabase}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `classify` found for struct `DomainClassifier` in the current scope [INFO] [stdout] --> examples/domain_classifier_demo.rs:61:33 [INFO] [stdout] | [INFO] [stdout] 61 | let result = classifier.classify(domain)?; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `classify_domain` with a similar name [INFO] [stdout] | [INFO] [stdout] 61 | let result = classifier.classify_domain(domain)?; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `classify` found for mutable reference `&mut DomainClassifier` in the current scope [INFO] [stdout] --> examples/real_dns_server.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | match classifier.classify(domain) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `classify_domain` with a similar name [INFO] [stdout] | [INFO] [stdout] 108 | match classifier.classify_domain(domain) { [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Block` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/domain_classifier_demo.rs:72:29 [INFO] [stdout] | [INFO] [stdout] 72 | DomainCategory::Block => "🚫 阻断", [INFO] [stdout] | ^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Block` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/real_dns_server.rs:123:33 [INFO] [stdout] | [INFO] [stdout] 123 | DomainCategory::Block => { [INFO] [stdout] | ^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/domain_classifier_demo.rs:73:29 [INFO] [stdout] | [INFO] [stdout] 73 | DomainCategory::Default => { [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/real_dns_server.rs:129:33 [INFO] [stdout] | [INFO] [stdout] 129 | DomainCategory::Default => { [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `classify_batch` found for struct `DomainClassifier` in the current scope [INFO] [stdout] --> examples/domain_classifier_demo.rs:96:36 [INFO] [stdout] | [INFO] [stdout] 96 | let batch_results = classifier.classify_batch(&batch_domains)?; [INFO] [stdout] | ^^^^^^^^^^^^^^ method not found in `DomainClassifier` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `get_cache_stats` found for struct `DomainClassifier` in the current scope [INFO] [stdout] --> examples/domain_classifier_demo.rs:101:34 [INFO] [stdout] | [INFO] [stdout] 101 | let cache_stats = classifier.get_cache_stats(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ method not found in `DomainClassifier` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `unsafe` block [INFO] [stdout] --> src/cache/lru_cache.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | unsafe { [INFO] [stdout] | ^^^^^^ unnecessary `unsafe` block [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_unsafe)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be applied to values that implement `Try` [INFO] [stdout] --> examples/signal_handler_interactive_demo.rs:23:43 [INFO] [stdout] | [INFO] [stdout] 23 | let dns_manager = Arc::new(Mutex::new(LinuxDnsManager::new()?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `LinuxDnsManager` [INFO] [stdout] | [INFO] [stdout] = help: the nightly-only, unstable trait `Try` is not implemented for `LinuxDnsManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `is_direct_domain` found for struct `DomainClassifier` in the current scope [INFO] [stdout] --> examples/domain_classifier_demo.rs:116:36 [INFO] [stdout] | [INFO] [stdout] 116 | let is_direct = classifier.is_direct_domain(domain)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ method not found in `DomainClassifier` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be applied to values that implement `Try` [INFO] [stdout] --> examples/signal_handler_demo.rs:22:43 [INFO] [stdout] | [INFO] [stdout] 22 | let dns_manager = Arc::new(Mutex::new(LinuxDnsManager::new()?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `LinuxDnsManager` [INFO] [stdout] | [INFO] [stdout] = help: the nightly-only, unstable trait `Try` is not implemented for `LinuxDnsManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `is_proxy_domain` found for struct `DomainClassifier` in the current scope [INFO] [stdout] --> examples/domain_classifier_demo.rs:117:35 [INFO] [stdout] | [INFO] [stdout] 117 | let is_proxy = classifier.is_proxy_domain(domain)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ method not found in `DomainClassifier` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no function or associated item named `disabled` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/signal_handler_interactive_demo.rs:24:65 [INFO] [stdout] | [INFO] [stdout] 24 | let iptables_manager = Arc::new(Mutex::new(IptablesManager::disabled())); [INFO] [stdout] | ^^^^^^^^ function or associated item not found in `IptablesManager` [INFO] [stdout] | [INFO] [stdout] note: if you're trying to build a new `IptablesManager`, consider using `IptablesManager::new` which returns `IptablesManager` [INFO] [stdout] --> src/system/iptables.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn new() -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/cache/safe_cache.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | if let Some(mut record) = cache.get_mut(domain) { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0599`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `with_dns_manager` found for struct `SignalHandler` in the current scope [INFO] [stdout] --> examples/signal_handler_interactive_demo.rs:28:10 [INFO] [stdout] | [INFO] [stdout] 27 | let signal_handler = SignalHandler::new() [INFO] [stdout] | __________________________- [INFO] [stdout] 28 | | .with_dns_manager(Arc::clone(&dns_manager)) [INFO] [stdout] | | -^^^^^^^^^^^^^^^^ method not found in `SignalHandler` [INFO] [stdout] | |_________| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `smart_dns_server::system::DnsManagerType` [INFO] [stdout] --> examples/dns_manager_basic_demo.rs:6:49 [INFO] [stdout] | [INFO] [stdout] 6 | use smart_dns_server::system::{LinuxDnsManager, DnsManagerType}; [INFO] [stdout] | ^^^^^^^^^^^^^^ no `DnsManagerType` in `system` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `needs_iptables_redirect` found for struct `PortManager` in the current scope [INFO] [stdout] --> examples/port_and_iptables_demo.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | if port_manager.needs_iptables_redirect() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `needs_redirect` with a similar name [INFO] [stdout] | [INFO] [stdout] 39 - if port_manager.needs_iptables_redirect() { [INFO] [stdout] 39 + if port_manager.needs_redirect() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no function or associated item named `disabled` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/signal_handler_demo.rs:23:65 [INFO] [stdout] | [INFO] [stdout] 23 | let iptables_manager = Arc::new(Mutex::new(IptablesManager::disabled())); [INFO] [stdout] | ^^^^^^^^ function or associated item not found in `IptablesManager` [INFO] [stdout] | [INFO] [stdout] note: if you're trying to build a new `IptablesManager`, consider using `IptablesManager::new` which returns `IptablesManager` [INFO] [stdout] --> src/system/iptables.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn new() -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `config` is never read [INFO] [stdout] --> src/simple_optimized_main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 22 | struct AppState { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | config: SmartDnsConfig, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "domain_classifier_demo") due to 7 previous errors; 1 warning emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0277]: the `?` operator can only be applied to values that implement `Try` [INFO] [stdout] --> examples/dns_manager_demo.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | let mut dns_manager = LinuxDnsManager::new()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `LinuxDnsManager` [INFO] [stdout] | [INFO] [stdout] = help: the nightly-only, unstable trait `Try` is not implemented for `LinuxDnsManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `needs_iptables_redirect` found for struct `PortManager` in the current scope [INFO] [stdout] --> examples/integrated_system_demo.rs:27:39 [INFO] [stdout] | [INFO] [stdout] 27 | let needs_redirect = port_manager.needs_iptables_redirect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `needs_redirect` with a similar name [INFO] [stdout] | [INFO] [stdout] 27 - let needs_redirect = port_manager.needs_iptables_redirect(); [INFO] [stdout] 27 + let needs_redirect = port_manager.needs_redirect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0599`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `needs_iptables_redirect` found for struct `PortManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:40:21 [INFO] [stdout] | [INFO] [stdout] 40 | if port_manager.needs_iptables_redirect() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `needs_redirect` with a similar name [INFO] [stdout] | [INFO] [stdout] 40 - if port_manager.needs_iptables_redirect() { [INFO] [stdout] 40 + if port_manager.needs_redirect() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `with_dns_manager` found for struct `SignalHandler` in the current scope [INFO] [stdout] --> examples/signal_handler_demo.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 26 | let signal_handler = SignalHandler::new() [INFO] [stdout] | __________________________- [INFO] [stdout] 27 | | .with_dns_manager(Arc::clone(&dns_manager)) [INFO] [stdout] | | -^^^^^^^^^^^^^^^^ method not found in `SignalHandler` [INFO] [stdout] | |_________| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `setup_redirect` found for struct `tokio::sync::MutexGuard<'_, IptablesManager>` in the current scope [INFO] [stdout] --> examples/integrated_system_demo.rs:37:45 [INFO] [stdout] | [INFO] [stdout] 37 | match iptables_manager.lock().await.setup_redirect(selected_port).await { [INFO] [stdout] | ^^^^^^^^^^^^^^ method not found in `tokio::sync::MutexGuard<'_, IptablesManager>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `smart_dns_server::classifier::ClassificationResult` [INFO] [stdout] --> examples/cache_demo.rs:2:36 [INFO] [stdout] | [INFO] [stdout] 2 | use smart_dns_server::classifier::{ClassificationResult, DomainCategory}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ no `ClassificationResult` in `classifier` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be applied to values that implement `Try` [INFO] [stdout] --> examples/integrated_system_demo.rs:50:43 [INFO] [stdout] | [INFO] [stdout] 50 | let dns_manager = Arc::new(Mutex::new(LinuxDnsManager::new()?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `LinuxDnsManager` [INFO] [stdout] | [INFO] [stdout] = help: the nightly-only, unstable trait `Try` is not implemented for `LinuxDnsManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be applied to values that implement `Try` [INFO] [stdout] --> examples/dns_manager_basic_demo.rs:19:23 [INFO] [stdout] | [INFO] [stdout] 19 | let dns_manager = LinuxDnsManager::new()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `LinuxDnsManager` [INFO] [stdout] | [INFO] [stdout] = help: the nightly-only, unstable trait `Try` is not implemented for `LinuxDnsManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `setup_redirect` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/port_and_iptables_demo.rs:42:32 [INFO] [stdout] | [INFO] [stdout] 42 | match iptables_manager.setup_redirect(selected_port).await { [INFO] [stdout] | ^^^^^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "real_dns_server") due to 3 previous errors; 1 warning emitted [INFO] [stdout] error[E0599]: no method named `with_dns_manager` found for struct `SignalHandler` in the current scope [INFO] [stdout] --> examples/integrated_system_demo.rs:60:10 [INFO] [stdout] | [INFO] [stdout] 59 | let signal_handler = SignalHandler::new() [INFO] [stdout] | __________________________- [INFO] [stdout] 60 | | .with_dns_manager(Arc::clone(&dns_manager)) [INFO] [stdout] | | -^^^^^^^^^^^^^^^^ method not found in `SignalHandler` [INFO] [stdout] | |_________| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `needs_iptables_redirect` found for struct `PortManager` in the current scope [INFO] [stdout] --> examples/port_manager_demo.rs:28:29 [INFO] [stdout] | [INFO] [stdout] 28 | if port_manager.needs_iptables_redirect() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `needs_redirect` with a similar name [INFO] [stdout] | [INFO] [stdout] 28 - if port_manager.needs_iptables_redirect() { [INFO] [stdout] 28 + if port_manager.needs_redirect() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "signal_handler_interactive_demo") due to 3 previous errors [INFO] [stdout] Some errors have detailed explanations: E0277, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `setup_redirect` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:43:32 [INFO] [stdout] | [INFO] [stdout] 43 | match iptables_manager.setup_redirect(selected_port).await { [INFO] [stdout] | ^^^^^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "dns_manager_demo") due to 1 previous error [INFO] [stdout] Some errors have detailed explanations: E0277, E0432. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `verify_rules` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/port_and_iptables_demo.rs:47:40 [INFO] [stdout] | [INFO] [stdout] 47 | match iptables_manager.verify_rules().await { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `list_rules` with a similar name [INFO] [stdout] | [INFO] [stdout] 47 - match iptables_manager.verify_rules().await { [INFO] [stdout] 47 + match iptables_manager.list_rules().await { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "integrated_system_demo") due to 4 previous errors [INFO] [stdout] error[E0432]: unresolved imports `smart_dns_server::upstream::UpstreamDnsServer`, `smart_dns_server::upstream::QueryStrategy`, `smart_dns_server::upstream::DnsQuery` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:8:25 [INFO] [stdout] | [INFO] [stdout] 8 | UpstreamDnsManager, UpstreamDnsServer, QueryStrategy, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ no `QueryStrategy` in `upstream` [INFO] [stdout] | | [INFO] [stdout] | no `UpstreamDnsServer` in `upstream` [INFO] [stdout] 9 | DnsQuery, [INFO] [stdout] | ^^^^^^^^ no `DnsQuery` in `upstream` [INFO] [stdout] | [INFO] [stdout] help: a similar name exists in the module [INFO] [stdout] | [INFO] [stdout] 8 - UpstreamDnsManager, UpstreamDnsServer, QueryStrategy, [INFO] [stdout] 8 + UpstreamDnsManager, UpstreamDnsManager, QueryStrategy, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "dns_manager_basic_demo") due to 2 previous errors [INFO] [stdout] error[E0599]: no method named `get_port_status` found for struct `PortManager` in the current scope [INFO] [stdout] --> examples/port_manager_demo.rs:35:39 [INFO] [stdout] | [INFO] [stdout] 35 | let status = port_manager.get_port_status(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ method not found in `PortManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `verify_rules` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:48:40 [INFO] [stdout] | [INFO] [stdout] 48 | match iptables_manager.verify_rules().await { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `list_rules` with a similar name [INFO] [stdout] | [INFO] [stdout] 48 - match iptables_manager.verify_rules().await { [INFO] [stdout] 48 + match iptables_manager.list_rules().await { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0599`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `get_port_status` found for struct `PortManager` in the current scope [INFO] [stdout] --> examples/port_and_iptables_demo.rs:64:36 [INFO] [stdout] | [INFO] [stdout] 64 | let port_status = port_manager.get_port_status(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ method not found in `PortManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "port_manager_demo") due to 2 previous errors [INFO] [stdout] error[E0599]: no method named `get_port_status` found for struct `PortManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:73:36 [INFO] [stdout] | [INFO] [stdout] 73 | let port_status = port_manager.get_port_status(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ method not found in `PortManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "signal_handler_demo") due to 3 previous errors [INFO] [stdout] error[E0599]: no method named `get_status` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/port_and_iptables_demo.rs:65:44 [INFO] [stdout] | [INFO] [stdout] 65 | let iptables_status = iptables_manager.get_status(); [INFO] [stdout] | ^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:75:54 [INFO] [stdout] | [INFO] [stdout] 75 | match manager.query(&query, &DomainCategory::Default).await { [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `contains_key` found for struct `LruCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:54:35 [INFO] [stdout] | [INFO] [stdout] 54 | info!("user3是否还存在: {}", cache.contains_key(&"user3".to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `contains` with a similar name [INFO] [stdout] | [INFO] [stdout] 54 - info!("user3是否还存在: {}", cache.contains_key(&"user3".to_string())); [INFO] [stdout] 54 + info!("user3是否还存在: {}", cache.contains(&"user3".to_string())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `response` on type `trust_dns_client::op::Message` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:77:34 [INFO] [stdout] | [INFO] [stdout] 77 | let ips = result.response.get_ips(); [INFO] [stdout] | ^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `server` on type `trust_dns_client::op::Message` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:81:30 [INFO] [stdout] | [INFO] [stdout] 81 | result.server, [INFO] [stdout] | ^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `response` on type `trust_dns_client::op::Message` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:82:30 [INFO] [stdout] | [INFO] [stdout] 82 | result.response.response_time, [INFO] [stdout] | ^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `get_status` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:74:44 [INFO] [stdout] | [INFO] [stdout] 74 | let iptables_status = iptables_manager.get_status(); [INFO] [stdout] | ^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `is_rules_applied` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/port_and_iptables_demo.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | if iptables_manager.is_rules_applied() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `query_with_strategy` found for reference `&UpstreamDnsManager` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:108:23 [INFO] [stdout] | [INFO] [stdout] 108 | match manager.query_with_strategy(&query, &DomainCategory::Default, &strategy).await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ method not found in `&UpstreamDnsManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:108:68 [INFO] [stdout] | [INFO] [stdout] 108 | match manager.query_with_strategy(&query, &DomainCategory::Default, &strategy).await { [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:133:40 [INFO] [stdout] | [INFO] [stdout] 133 | ("github.com", DomainCategory::Default, "默认域名"), [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `stats` found for struct `LruCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:57:23 [INFO] [stdout] | [INFO] [stdout] 57 | let stats = cache.stats(); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_stats` with a similar name [INFO] [stdout] | [INFO] [stdout] 57 | let stats = cache.get_stats(); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `is_rules_applied` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:90:25 [INFO] [stdout] | [INFO] [stdout] 90 | if iptables_manager.is_rules_applied() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/optimized_main.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | let mut dns_server = OptimizedDnsServer::new(server_config).await [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] error[E0599]: no method named `cleanup_redirect` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/port_and_iptables_demo.rs:83:32 [INFO] [stdout] | [INFO] [stdout] 83 | match iptables_manager.cleanup_redirect().await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `cleanup_redirect` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:91:32 [INFO] [stdout] | [INFO] [stdout] 91 | match iptables_manager.cleanup_redirect().await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ method not found in `IptablesManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:139:37 [INFO] [stdout] | [INFO] [stdout] 139 | match manager.query(&query, &category).await { [INFO] [stdout] | ----- ^^^^^^^^^ expected `&[String]`, found `&DomainCategory` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&[String]` [INFO] [stdout] found reference `&DomainCategory` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/upstream/manager.rs:153:18 [INFO] [stdout] | [INFO] [stdout] 153 | pub async fn query(&self, request: &Message, servers: &[String]) -> Result { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `response` on type `trust_dns_client::op::Message` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:145:30 [INFO] [stdout] | [INFO] [stdout] 145 | result.response.get_first_ip().map(|ip| ip.to_string()).unwrap_or("无IP".to_string()), [INFO] [stdout] | ^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `server` on type `trust_dns_client::op::Message` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:146:30 [INFO] [stdout] | [INFO] [stdout] 146 | result.server); [INFO] [stdout] | ^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `config` is never read [INFO] [stdout] --> src/optimized_main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 22 | struct AppState { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 26 | config: SmartDnsConfig, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:171:56 [INFO] [stdout] | [INFO] [stdout] 171 | let _ = manager.query(&query, &DomainCategory::Default).await; [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `put` found for struct `TtlCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:68:11 [INFO] [stdout] | [INFO] [stdout] 68 | cache.put("session1".to_string(), "active".to_string()); [INFO] [stdout] | ^^^ method not found in `TtlCache` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `get_stats` found for reference `&UpstreamDnsManager` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:175:25 [INFO] [stdout] | [INFO] [stdout] 175 | let stats = manager.get_stats().await; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_server_stats` with a similar name [INFO] [stdout] | [INFO] [stdout] 175 | let stats = manager.get_server_stats().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `verify_rules` found for struct `IptablesManager` in the current scope [INFO] [stdout] --> examples/redirect_scenario_demo.rs:96:40 [INFO] [stdout] | [INFO] [stdout] 96 | match iptables_manager.verify_rules().await { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `list_rules` with a similar name [INFO] [stdout] | [INFO] [stdout] 96 - match iptables_manager.verify_rules().await { [INFO] [stdout] 96 + match iptables_manager.list_rules().await { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:211:67 [INFO] [stdout] | [INFO] [stdout] 211 | .with_categories(vec![DomainCategory::Direct, DomainCategory::Default]); [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env_filter` [INFO] [stdout] --> src/utils/logging.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | let env_filter = EnvFilter::new(level); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_env_filter` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `add_server` found for reference `&UpstreamDnsManager` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:213:13 [INFO] [stdout] | [INFO] [stdout] 213 | manager.add_server(custom_server).await; [INFO] [stdout] | ^^^^^^^^^^ method not found in `&UpstreamDnsManager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0599`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `get_servers` found for reference `&UpstreamDnsManager` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:215:27 [INFO] [stdout] | [INFO] [stdout] 215 | let servers = manager.get_servers().await; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_server_stats` with a similar name [INFO] [stdout] | [INFO] [stdout] 215 | let servers = manager.get_server_stats().await; [INFO] [stdout] | +++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:220:33 [INFO] [stdout] | [INFO] [stdout] 220 | match manager.query(&query, &DomainCategory::Direct).await { [INFO] [stdout] | ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&DomainCategory` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&[String]` [INFO] [stdout] found reference `&DomainCategory` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/upstream/manager.rs:153:18 [INFO] [stdout] | [INFO] [stdout] 153 | pub async fn query(&self, request: &Message, servers: &[String]) -> Result { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `response` on type `trust_dns_client::op::Message` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:223:26 [INFO] [stdout] | [INFO] [stdout] 223 | result.response.get_first_ip().map(|ip| ip.to_string()).unwrap_or("无IP".to_string()), [INFO] [stdout] | ^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "port_and_iptables_demo") due to 7 previous errors [INFO] [stdout] error[E0609]: no field `server` on type `trust_dns_client::op::Message` [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:224:26 [INFO] [stdout] | [INFO] [stdout] 224 | result.server); [INFO] [stdout] | ^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `put_with_ttl` found for struct `TtlCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:69:11 [INFO] [stdout] | [INFO] [stdout] 69 | cache.put_with_ttl("session2".to_string(), "temp".to_string(), Duration::from_millis(500)); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `insert_with_ttl` with a similar name [INFO] [stdout] | [INFO] [stdout] 69 - cache.put_with_ttl("session2".to_string(), "temp".to_string(), Duration::from_millis(500)); [INFO] [stdout] 69 + cache.insert_with_ttl("session2".to_string(), "temp".to_string(), Duration::from_millis(500)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0599`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `remove_server` found for reference `&UpstreamDnsManager` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | manager.remove_server("自定义DNS").await; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_remote_servers` with a similar name, but with different arguments [INFO] [stdout] --> src/upstream/manager.rs:525:5 [INFO] [stdout] | [INFO] [stdout] 525 | pub fn get_remote_servers(&self) -> &[DnsServerType] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "redirect_scenario_demo") due to 8 previous errors [INFO] [stdout] error[E0599]: no method named `get_servers` found for reference `&UpstreamDnsManager` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:233:33 [INFO] [stdout] | [INFO] [stdout] 233 | let servers_after = manager.get_servers().await; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_server_stats` with a similar name [INFO] [stdout] | [INFO] [stdout] 233 | let servers_after = manager.get_server_stats().await; [INFO] [stdout] | +++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `config` is never read [INFO] [stdout] --> src/system/problem_solver.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct SystemProblemSolver { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] 15 | config: Arc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `query_servers`, `query_servers_concurrent`, and `query_single_server_static` are never used [INFO] [stdout] --> src/upstream/manager.rs:329:14 [INFO] [stdout] | [INFO] [stdout] 105 | impl UpstreamDnsManager { [INFO] [stdout] | ----------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 329 | async fn query_servers(&self, request: &Message, servers: &[SocketAddr]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 406 | async fn query_servers_concurrent(&self, request: &Message, servers: &[SocketAddr]) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 442 | async fn query_single_server_static( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `timeout` is never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct EncryptedDnsClient { [INFO] [stdout] | ------------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 22 | timeout: Duration, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `EncryptedDnsClient` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `status` is never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 143 | struct DoHResponse { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 144 | #[serde(rename = "Status")] [INFO] [stdout] 145 | status: Option, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DoHResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 1 argument but 0 arguments were supplied [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | let manager = UpstreamDnsManager::new() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^-- argument #1 of type `UpstreamConfig` is missing [INFO] [stdout] | [INFO] [stdout] note: associated function defined here [INFO] [stdout] --> src/upstream/manager.rs:107:12 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn new(config: UpstreamConfig) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] help: provide the argument [INFO] [stdout] | [INFO] [stdout] 25 | let manager = UpstreamDnsManager::new(/* UpstreamConfig */) [INFO] [stdout] | ++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `record_type` are never read [INFO] [stdout] --> src/upstream/encrypted_dns.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 152 | struct DoHAnswer { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 153 | #[serde(rename = "name")] [INFO] [stdout] 154 | name: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] 155 | #[serde(rename = "type")] [INFO] [stdout] 156 | record_type: Option, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DoHAnswer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `alert_states` is never read [INFO] [stdout] --> src/stats/monitor.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct SystemMonitor { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | alert_states: AlertStates, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SystemMonitor` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `cpu_alert_active`, `memory_alert_active`, `dns_success_rate_alert_active`, `cache_hit_rate_alert_active`, and `response_time_alert_active` are never read [INFO] [stdout] --> src/stats/monitor.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 96 | struct AlertStates { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 97 | cpu_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 98 | memory_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 99 | dns_success_rate_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 100 | cache_hit_rate_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 101 | response_time_alert_active: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AlertStates` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/config/mod.rs:186:29 [INFO] [stdout] | [INFO] [stdout] 186 | if port == 0 || port > 65535 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `stats` found for struct `TtlCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:89:23 [INFO] [stdout] | [INFO] [stdout] 89 | let stats = cache.stats(); [INFO] [stdout] | ^^^^^ private field, not a method [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_stats` with a similar name [INFO] [stdout] | [INFO] [stdout] 89 | let stats = cache.get_stats(); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 1 argument but 0 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:97:17 [INFO] [stdout] | [INFO] [stdout] 97 | let cache = DnsCache::new(); [INFO] [stdout] | ^^^^^^^^^^^^^-- argument #1 of type `usize` is missing [INFO] [stdout] | [INFO] [stdout] note: associated function defined here [INFO] [stdout] --> src/cache/lru_cache.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn new(capacity: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] help: provide the argument [INFO] [stdout] | [INFO] [stdout] 97 | let cache = DnsCache::new(/* usize */); [INFO] [stdout] | +++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 133 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 159 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/launcher/mod.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 198 | let _ = shutdown_clone.trigger_shutdown().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `with_strategy` found for enum `Result` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:26:10 [INFO] [stdout] | [INFO] [stdout] 25 | let manager = UpstreamDnsManager::new() [INFO] [stdout] | ___________________- [INFO] [stdout] 26 | | .with_strategy(QueryStrategy::FastestResponse) [INFO] [stdout] | | -^^^^^^^^^^^^^ method not found in `Result` [INFO] [stdout] | |_________| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 2 arguments but 3 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:100:11 [INFO] [stdout] | [INFO] [stdout] 100 | cache.put("baidu.com".to_string(), "A".to_string(), "39.156.66.10".to_string()); [INFO] [stdout] | ^^^ --------------- -------------------------- unexpected argument #3 of type `String` [INFO] [stdout] | | [INFO] [stdout] | expected `Message`, found `String` [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:96:12 [INFO] [stdout] | [INFO] [stdout] 96 | pub fn put(&mut self, key: K, value: V) { [INFO] [stdout] | ^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 100 - cache.put("baidu.com".to_string(), "A".to_string(), "39.156.66.10".to_string()); [INFO] [stdout] 100 + cache.put("baidu.com".to_string(), /* trust_dns_client::op::Message */); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 2 arguments but 3 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:101:11 [INFO] [stdout] | [INFO] [stdout] 101 | cache.put("google.com".to_string(), "A".to_string(), "8.8.8.8".to_string()); [INFO] [stdout] | ^^^ --------------- --------------------- unexpected argument #3 of type `String` [INFO] [stdout] | | [INFO] [stdout] | expected `Message`, found `String` [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:96:12 [INFO] [stdout] | [INFO] [stdout] 96 | pub fn put(&mut self, key: K, value: V) { [INFO] [stdout] | ^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 101 - cache.put("google.com".to_string(), "A".to_string(), "8.8.8.8".to_string()); [INFO] [stdout] 101 + cache.put("google.com".to_string(), /* trust_dns_client::op::Message */); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 2 arguments but 3 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:102:11 [INFO] [stdout] | [INFO] [stdout] 102 | cache.put("github.com".to_string(), "AAAA".to_string(), "2606:50c0:8000::153".to_string()); [INFO] [stdout] | ^^^ ------------------ --------------------------------- unexpected argument #3 of type `String` [INFO] [stdout] | | [INFO] [stdout] | expected `Message`, found `String` [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:96:12 [INFO] [stdout] | [INFO] [stdout] 96 | pub fn put(&mut self, key: K, value: V) { [INFO] [stdout] | ^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 102 - cache.put("github.com".to_string(), "AAAA".to_string(), "2606:50c0:8000::153".to_string()); [INFO] [stdout] 102 + cache.put("github.com".to_string(), /* trust_dns_client::op::Message */); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Block` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:244:25 [INFO] [stdout] | [INFO] [stdout] 244 | DomainCategory::Block => "阻断", [INFO] [stdout] | ^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 1 argument but 2 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:107:42 [INFO] [stdout] | [INFO] [stdout] 107 | info!("查询baidu.com A记录: {:?}", cache.get("baidu.com", "A")); [INFO] [stdout] | ^^^ ----------- --- unexpected argument #2 of type `&'static str` [INFO] [stdout] | | [INFO] [stdout] | expected `&String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn get(&mut self, key: &K) -> Option<&V> { [INFO] [stdout] | ^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 107 - info!("查询baidu.com A记录: {:?}", cache.get("baidu.com", "A")); [INFO] [stdout] 107 + info!("查询baidu.com A记录: {:?}", cache.get(/* &String */)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/upstream_dns_manager_demo.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | DomainCategory::Default => "默认", [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 1 argument but 2 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:108:43 [INFO] [stdout] | [INFO] [stdout] 108 | info!("查询google.com A记录: {:?}", cache.get("google.com", "A")); [INFO] [stdout] | ^^^ ------------ --- unexpected argument #2 of type `&'static str` [INFO] [stdout] | | [INFO] [stdout] | expected `&String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn get(&mut self, key: &K) -> Option<&V> { [INFO] [stdout] | ^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 108 - info!("查询google.com A记录: {:?}", cache.get("google.com", "A")); [INFO] [stdout] 108 + info!("查询google.com A记录: {:?}", cache.get(/* &String */)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0061, E0308, E0432, E0599, E0609. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0061`. [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 1 argument but 2 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:109:46 [INFO] [stdout] | [INFO] [stdout] 109 | info!("查询github.com AAAA记录: {:?}", cache.get("github.com", "AAAA")); [INFO] [stdout] | ^^^ ------------ ------ unexpected argument #2 of type `&'static str` [INFO] [stdout] | | [INFO] [stdout] | expected `&String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn get(&mut self, key: &K) -> Option<&V> { [INFO] [stdout] | ^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 109 - info!("查询github.com AAAA记录: {:?}", cache.get("github.com", "AAAA")); [INFO] [stdout] 109 + info!("查询github.com AAAA记录: {:?}", cache.get(/* &String */)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "upstream_dns_manager_demo") due to 25 previous errors [INFO] [stdout] error[E0061]: this method takes 1 argument but 2 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:110:35 [INFO] [stdout] | [INFO] [stdout] 110 | info!("查询不存在的记录: {:?}", cache.get("notfound.com", "A")); [INFO] [stdout] | ^^^ -------------- --- unexpected argument #2 of type `&'static str` [INFO] [stdout] | | [INFO] [stdout] | expected `&String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn get(&mut self, key: &K) -> Option<&V> { [INFO] [stdout] | ^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 110 - info!("查询不存在的记录: {:?}", cache.get("notfound.com", "A")); [INFO] [stdout] 110 + info!("查询不存在的记录: {:?}", cache.get(/* &String */)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 1 argument but 2 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:113:42 [INFO] [stdout] | [INFO] [stdout] 113 | info!("是否包含baidu.com A记录: {}", cache.contains("baidu.com", "A")); [INFO] [stdout] | ^^^^^^^^ ----------- --- unexpected argument #2 of type `&'static str` [INFO] [stdout] | | [INFO] [stdout] | expected `&String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn contains(&self, key: &K) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 113 - info!("是否包含baidu.com A记录: {}", cache.contains("baidu.com", "A")); [INFO] [stdout] 113 + info!("是否包含baidu.com A记录: {}", cache.contains(/* &String */)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 1 argument but 2 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:114:45 [INFO] [stdout] | [INFO] [stdout] 114 | info!("是否包含notfound.com A记录: {}", cache.contains("notfound.com", "A")); [INFO] [stdout] | ^^^^^^^^ -------------- --- unexpected argument #2 of type `&'static str` [INFO] [stdout] | | [INFO] [stdout] | expected `&String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn contains(&self, key: &K) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 114 - info!("是否包含notfound.com A记录: {}", cache.contains("notfound.com", "A")); [INFO] [stdout] 114 + info!("是否包含notfound.com A记录: {}", cache.contains(/* &String */)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this method takes 1 argument but 2 arguments were supplied [INFO] [stdout] --> examples/cache_demo.rs:117:25 [INFO] [stdout] | [INFO] [stdout] 117 | let removed = cache.remove("google.com", "A"); [INFO] [stdout] | ^^^^^^ ------------ --- unexpected argument #2 of type `&'static str` [INFO] [stdout] | | [INFO] [stdout] | expected `&String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/lru_cache.rs:127:12 [INFO] [stdout] | [INFO] [stdout] 127 | pub fn remove(&mut self, key: &K) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 117 - let removed = cache.remove("google.com", "A"); [INFO] [stdout] 117 + let removed = cache.remove(/* &String */); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `config` found for struct `LruCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:122:24 [INFO] [stdout] | [INFO] [stdout] 122 | let config = cache.config(); [INFO] [stdout] | ^^^^^^ method not found in `LruCache` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 2 arguments but 1 argument was supplied [INFO] [stdout] --> examples/cache_demo.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | let cache = DomainClassificationCache::new(1000); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ argument #2 of type `Duration` is missing [INFO] [stdout] | [INFO] [stdout] note: associated function defined here [INFO] [stdout] --> src/cache/ttl.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn new(max_capacity: usize, default_ttl: Duration) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] help: provide the argument [INFO] [stdout] | [INFO] [stdout] 130 | let cache = DomainClassificationCache::new(1000, /* Duration */); [INFO] [stdout] | ++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no variant or associated item named `Default` found for enum `DomainCategory` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:149:35 [INFO] [stdout] | [INFO] [stdout] 149 | category: DomainCategory::Default, [INFO] [stdout] | ^^^^^^^ variant or associated item not found in `DomainCategory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `put` found for struct `TtlCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:155:11 [INFO] [stdout] | [INFO] [stdout] 155 | cache.put("baidu.com".to_string(), baidu_result); [INFO] [stdout] | ^^^ method not found in `TtlCache` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `put` found for struct `TtlCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:156:11 [INFO] [stdout] | [INFO] [stdout] 156 | cache.put("google.com".to_string(), google_result); [INFO] [stdout] | ^^^ method not found in `TtlCache` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `put` found for struct `TtlCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:157:11 [INFO] [stdout] | [INFO] [stdout] 157 | cache.put("github.com".to_string(), github_result); [INFO] [stdout] | ^^^ method not found in `TtlCache` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/cache_demo.rs:162:37 [INFO] [stdout] | [INFO] [stdout] 162 | if let Some(result) = cache.get("baidu.com") { [INFO] [stdout] | --- ^^^^^^^^^^^ expected `&String`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/ttl.rs:91:12 [INFO] [stdout] | [INFO] [stdout] 91 | pub fn get(&mut self, key: &K) -> Option<&V> { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `category` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:164:22 [INFO] [stdout] | [INFO] [stdout] 164 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `matched_rule` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:164:39 [INFO] [stdout] | [INFO] [stdout] 164 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `confidence` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:164:60 [INFO] [stdout] | [INFO] [stdout] 164 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/cache_demo.rs:167:37 [INFO] [stdout] | [INFO] [stdout] 167 | if let Some(result) = cache.get("google.com") { [INFO] [stdout] | --- ^^^^^^^^^^^^ expected `&String`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/ttl.rs:91:12 [INFO] [stdout] | [INFO] [stdout] 91 | pub fn get(&mut self, key: &K) -> Option<&V> { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `category` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:169:22 [INFO] [stdout] | [INFO] [stdout] 169 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `matched_rule` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:169:39 [INFO] [stdout] | [INFO] [stdout] 169 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `confidence` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:169:60 [INFO] [stdout] | [INFO] [stdout] 169 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/cache_demo.rs:172:37 [INFO] [stdout] | [INFO] [stdout] 172 | if let Some(result) = cache.get("github.com") { [INFO] [stdout] | --- ^^^^^^^^^^^^ expected `&String`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/ttl.rs:91:12 [INFO] [stdout] | [INFO] [stdout] 91 | pub fn get(&mut self, key: &K) -> Option<&V> { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `category` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:174:22 [INFO] [stdout] | [INFO] [stdout] 174 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `matched_rule` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:174:39 [INFO] [stdout] | [INFO] [stdout] 174 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `confidence` on type `&DomainCategory` [INFO] [stdout] --> examples/cache_demo.rs:174:60 [INFO] [stdout] | [INFO] [stdout] 174 | result.category, result.matched_rule, result.confidence); [INFO] [stdout] | ^^^^^^^^^^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/cache_demo.rs:178:47 [INFO] [stdout] | [INFO] [stdout] 178 | info!("是否包含baidu.com: {}", cache.contains("baidu.com")); [INFO] [stdout] | -------- ^^^^^^^^^^^ expected `&String`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/ttl.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn contains(&self, key: &K) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/cache_demo.rs:179:49 [INFO] [stdout] | [INFO] [stdout] 179 | info!("是否包含unknown.com: {}", cache.contains("unknown.com")); [INFO] [stdout] | -------- ^^^^^^^^^^^^^ expected `&String`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&'static str` [INFO] [stdout] note: method defined here [INFO] [stdout] --> src/cache/ttl.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn contains(&self, key: &K) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `stats` found for struct `TtlCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:182:23 [INFO] [stdout] | [INFO] [stdout] 182 | let stats = cache.stats(); [INFO] [stdout] | ^^^^^ private field, not a method [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_stats` with a similar name [INFO] [stdout] | [INFO] [stdout] 182 | let stats = cache.get_stats(); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `stats` found for struct `LruCache` in the current scope [INFO] [stdout] --> examples/cache_demo.rs:216:23 [INFO] [stdout] | [INFO] [stdout] 216 | let stats = cache.stats(); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] help: there is a method `get_stats` with a similar name [INFO] [stdout] | [INFO] [stdout] 216 | let stats = cache.get_stats(); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0061, E0308, E0432, E0599, E0609. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0061`. [INFO] [stdout] [INFO] [stderr] error: could not compile `smart-dns-server` (example "cache_demo") due to 39 previous errors [INFO] running `Command { std: "docker" "inspect" "470e76d68bd9ac73b88254770239cab731667a7302592af837d8df2abf98f3ec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "470e76d68bd9ac73b88254770239cab731667a7302592af837d8df2abf98f3ec", kill_on_drop: false }` [INFO] [stdout] 470e76d68bd9ac73b88254770239cab731667a7302592af837d8df2abf98f3ec