From a0df1725712bdcbe3a5f4f23bb845332cd9acd51 Mon Sep 17 00:00:00 2001 From: Sarah Brofeldt Date: Thu, 23 Jan 2025 13:54:52 +0100 Subject: [PATCH] remove dead code warnings as per rustc Leaves in one: ``` warning: field `0` is never read --> src/issuer.rs:246:28 | 246 | NoIpsForResolversFound(&'l String), | ---------------------- ^^^^^^^^^^ | | | field in this variant | = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 246 | NoIpsForResolversFound(()), | ``` That one should probably be dealt with after the next nixpkgs bump, because it'll start affecting every field that is only read via derived Debug traits. That seems to warrant some discussion. --- src/issuer.rs | 1 - src/vault.rs | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/issuer.rs b/src/issuer.rs index d2bcd81..f1428fd 100644 --- a/src/issuer.rs +++ b/src/issuer.rs @@ -23,7 +23,6 @@ use trust_dns_resolver::error::ResolveErrorKind; use std::net::IpAddr; use tokio::sync::RwLock; use std::fmt::Debug; -use crate::dns::DNSError; use crate::metrics; use crate::metrics::MetricsType; diff --git a/src/vault.rs b/src/vault.rs index ce3cf60..92941b4 100644 --- a/src/vault.rs +++ b/src/vault.rs @@ -404,9 +404,6 @@ impl CertSpecable for VaultSpec { } // Write meta file, meta file just contains a rfc3339 timestamp async fn touch(&self, config: &ConfigContainer) -> Result<(), TouchError> { - let monitor_config = config.get_vault_monitor_config()?; - let persist_spec = monitor_config.to_persist_spec(&self); - self.write_meta_file(config).await.map_err(|e| { log::error("failed to write meta file", &e); TouchError::Failed