refactor: add ArcMutex/ArcRwLock type aliases

Replace repeated Arc> and Arc> with concise type aliases for readability.
This commit is contained in:
Nils Andreas Svee committed 2026-04-18 19:04:35 +02:00
1 parent 7c40990e93
commit d0e3394f03
4 files changed
+17 -13

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
use crate::SHUTDOWN;
use crate::metrics::{Metric, MetricsSender};
use crate::util::{MutexExt, RwLockExt};
use crate::util::{ArcMutex, MutexExt, RwLockExt};
use crate::{Config, ReflectorStats};
use log::{debug, info};
use std::collections::HashMap;
@@ -13,7 +13,7 @@ use std::time::Duration;
pub struct ReflectorSelector {
pub config: Config,
pub owd_recent: Arc<Mutex<HashMap<IpAddr, ReflectorStats>>>,
pub owd_recent: ArcMutex<HashMap<IpAddr, ReflectorStats>>,
pub reflector_peers_lock: Arc<RwLock<Vec<IpAddr>>>,
pub reflector_pool: Vec<IpAddr>,
pub trigger_channel: Receiver<bool>,