From 2b3417d7036ecd34fac5225ca9e43746eaba41d0 Mon Sep 17 00:00:00 2001 From: Luna Yao <40349250+ZnqbuZ@users.noreply.github.com> Date: Mon, 6 Apr 2026 02:26:07 +0200 Subject: [PATCH] remove unneeded pub --- easytier/src/dns/mod.rs | 2 +- easytier/src/dns/node_mgr.rs | 10 +++++----- easytier/src/dns/peer_mgr.rs | 2 +- easytier/src/dns/server.rs | 6 +++--- easytier/src/dns/zone.rs | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/easytier/src/dns/mod.rs b/easytier/src/dns/mod.rs index befe4562..5598a1f6 100644 --- a/easytier/src/dns/mod.rs +++ b/easytier/src/dns/mod.rs @@ -5,7 +5,7 @@ mod peer_mgr; pub mod server; mod system; mod utils; -pub mod zone; +mod zone; #[cfg(test)] mod tests; diff --git a/easytier/src/dns/node_mgr.rs b/easytier/src/dns/node_mgr.rs index c9407ac1..09c2cc67 100644 --- a/easytier/src/dns/node_mgr.rs +++ b/easytier/src/dns/node_mgr.rs @@ -16,7 +16,7 @@ use tracing::instrument; use uuid::Uuid; #[derive(Debug, Clone, Default)] -pub struct DnsNodeInfo { +struct DnsNodeInfo { digest: Vec, zones: ZoneGroup, addresses: HashSet, @@ -40,15 +40,15 @@ const DNS_CLIENT_TTL: Duration = Duration::from_secs(5); #[derive(Debug, Default)] pub struct DnsNodeMgrDirtyFlags { - pub(super) catalog: DirtyFlag, - pub(super) addresses: DirtyFlag, - pub(super) listeners: DirtyFlag, + pub catalog: DirtyFlag, + pub addresses: DirtyFlag, + pub listeners: DirtyFlag, } #[derive(Debug)] pub struct DnsNodeMgr { nodes: Cache, - pub(super) dirty: DnsNodeMgrDirtyFlags, + pub dirty: DnsNodeMgrDirtyFlags, } impl DnsNodeMgr { diff --git a/easytier/src/dns/peer_mgr.rs b/easytier/src/dns/peer_mgr.rs index 6d0fc14d..05c8dc1b 100644 --- a/easytier/src/dns/peer_mgr.rs +++ b/easytier/src/dns/peer_mgr.rs @@ -22,7 +22,7 @@ use std::time::Duration; use tracing::instrument; #[derive(Debug, Clone)] -pub struct DnsPeerInfo { +struct DnsPeerInfo { digest: Vec, zones: Vec, } diff --git a/easytier/src/dns/server.rs b/easytier/src/dns/server.rs index a61b9483..86db53d6 100644 --- a/easytier/src/dns/server.rs +++ b/easytier/src/dns/server.rs @@ -37,18 +37,18 @@ use tracing::{instrument, Instrument}; use crate::instance::instance::{ArcNicCtx, NicCtx}; #[derive(Clone)] -pub struct DynamicCatalog { +struct DynamicCatalog { inner: Arc>, } impl DynamicCatalog { - pub fn new() -> Self { + fn new() -> Self { Self { inner: Arc::new(tokio::sync::RwLock::new(Catalog::new())), } } - pub async fn replace(&self, new: Catalog) { + async fn replace(&self, new: Catalog) { *self.inner.write().await = new; } } diff --git a/easytier/src/dns/zone.rs b/easytier/src/dns/zone.rs index dcf2d3a8..52bc0cd0 100644 --- a/easytier/src/dns/zone.rs +++ b/easytier/src/dns/zone.rs @@ -22,11 +22,11 @@ use uuid::Uuid; #[derive(Derivative, Debug, Clone)] #[derivative(PartialEq)] pub struct Zone { - pub(crate) id: Uuid, - pub(crate) origin: LowerName, - pub(crate) records: BTreeMap, + id: Uuid, + origin: LowerName, + records: BTreeMap, #[derivative(PartialEq(compare_with = "Zone::compare_forward"))] - pub(crate) forward: Option, + pub forward: Option, } impl Zone {