1
0
Fork 0
forked from mirror/grapevine

service/users: add ConnectionKey type alias

This commit is contained in:
Lambda 2024-09-06 18:04:08 +00:00
parent 971119318b
commit 11d3dfda30

View file

@ -32,15 +32,12 @@ pub(crate) struct SlidingSyncCache {
extensions: ExtensionsConfig,
}
type ConnectionKey = (OwnedUserId, OwnedDeviceId, String);
pub(crate) struct Service {
pub(crate) db: &'static dyn Data,
#[expect(clippy::type_complexity)]
pub(crate) connections: Mutex<
BTreeMap<
(OwnedUserId, OwnedDeviceId, String),
Arc<Mutex<SlidingSyncCache>>,
>,
>,
pub(crate) connections:
Mutex<BTreeMap<ConnectionKey, Arc<Mutex<SlidingSyncCache>>>>,
}
impl Service {