1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-16 15:50:50 +01:00

style: rename Sync(Mutex|RwLock) to Std(Mutex|RwLock)

This commit is contained in:
Matthias Ahouansou 2024-03-05 20:15:11 +00:00
parent e33d8430d3
commit 17dd8cb918
No known key found for this signature in database
2 changed files with 10 additions and 10 deletions

View file

@ -31,7 +31,7 @@ use std::{
path::PathBuf,
sync::{
atomic::{self, AtomicBool},
Arc, RwLock as SyncRwLock,
Arc, RwLock as StdRwLock,
},
time::{Duration, Instant},
};
@ -53,7 +53,7 @@ pub struct Service {
pub db: &'static dyn Data,
pub actual_destination_cache: Arc<RwLock<WellKnownMap>>, // actual_destination, host
pub tls_name_override: Arc<SyncRwLock<TlsNameMap>>,
pub tls_name_override: Arc<StdRwLock<TlsNameMap>>,
pub config: Config,
keypair: Arc<ruma::signatures::Ed25519KeyPair>,
dns_resolver: TokioAsyncResolver,
@ -109,11 +109,11 @@ impl Default for RotationHandler {
pub struct Resolver {
inner: GaiResolver,
overrides: Arc<SyncRwLock<TlsNameMap>>,
overrides: Arc<StdRwLock<TlsNameMap>>,
}
impl Resolver {
pub fn new(overrides: Arc<SyncRwLock<TlsNameMap>>) -> Self {
pub fn new(overrides: Arc<StdRwLock<TlsNameMap>>) -> Self {
Resolver {
inner: GaiResolver::new(),
overrides,
@ -159,7 +159,7 @@ impl Service {
}
};
let tls_name_override = Arc::new(SyncRwLock::new(TlsNameMap::new()));
let tls_name_override = Arc::new(StdRwLock::new(TlsNameMap::new()));
let jwt_decoding_key = config
.jwt_secret

View file

@ -1,6 +1,6 @@
use std::{
collections::{BTreeMap, HashMap},
sync::{Arc, Mutex as SyncMutex},
sync::{Arc, Mutex as StdMutex},
};
use lru_cache::LruCache;
@ -80,17 +80,17 @@ impl Services {
state: rooms::state::Service { db },
state_accessor: rooms::state_accessor::Service {
db,
server_visibility_cache: SyncMutex::new(LruCache::new(
server_visibility_cache: StdMutex::new(LruCache::new(
(100.0 * config.conduit_cache_capacity_modifier) as usize,
)),
user_visibility_cache: SyncMutex::new(LruCache::new(
user_visibility_cache: StdMutex::new(LruCache::new(
(100.0 * config.conduit_cache_capacity_modifier) as usize,
)),
},
state_cache: rooms::state_cache::Service { db },
state_compressor: rooms::state_compressor::Service {
db,
stateinfo_cache: SyncMutex::new(LruCache::new(
stateinfo_cache: StdMutex::new(LruCache::new(
(100.0 * config.conduit_cache_capacity_modifier) as usize,
)),
},
@ -108,7 +108,7 @@ impl Services {
uiaa: uiaa::Service { db },
users: users::Service {
db,
connections: SyncMutex::new(BTreeMap::new()),
connections: StdMutex::new(BTreeMap::new()),
},
account_data: account_data::Service { db },
admin: admin::Service::build(),