Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add an empty line between struct fields #4183

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/matrix-sdk-base/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,23 @@ use crate::{
pub struct BaseClient {
/// Database
pub(crate) store: Store,

/// The store used by the event cache.
event_cache_store: Arc<DynEventCacheStore>,

/// The store used for encryption.
///
/// This field is only meant to be used for `OlmMachine` initialization.
/// All operations on it happen inside the `OlmMachine`.
#[cfg(feature = "e2e-encryption")]
crypto_store: Arc<DynCryptoStore>,

/// The olm-machine that is created once the
/// [`SessionMeta`][crate::session::SessionMeta] is set via
/// [`BaseClient::set_session_meta`]
#[cfg(feature = "e2e-encryption")]
olm_machine: Arc<RwLock<Option<OlmMachine>>>,

/// Observable of when a user is ignored/unignored.
pub(crate) ignore_user_list_changes: SharedObservable<Vec<String>>,

Expand Down
9 changes: 9 additions & 0 deletions crates/matrix-sdk/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,15 @@ pub(crate) struct ClientLocks {
/// Look at the [`Account::mark_as_dm()`] method for a more detailed
/// explanation.
pub(crate) mark_as_dm_lock: Mutex<()>,

/// Lock ensuring that only a single secret store is getting opened at the
/// same time.
///
/// This is important so we don't accidentally create multiple different new
/// default secret storage keys.
#[cfg(feature = "e2e-encryption")]
pub(crate) open_secret_store_lock: Mutex<()>,

/// Lock ensuring that we're only storing a single secret at a time.
///
/// Take a look at the [`SecretStore::put_secret`] method for a more
Expand All @@ -175,23 +177,29 @@ pub(crate) struct ClientLocks {
/// [`SecretStore::put_secret`]: crate::encryption::secret_storage::SecretStore::put_secret
#[cfg(feature = "e2e-encryption")]
pub(crate) store_secret_lock: Mutex<()>,

/// Lock ensuring that only one method at a time might modify our backup.
#[cfg(feature = "e2e-encryption")]
pub(crate) backup_modify_lock: Mutex<()>,

/// Lock ensuring that we're going to attempt to upload backups for a single
/// requester.
#[cfg(feature = "e2e-encryption")]
pub(crate) backup_upload_lock: Mutex<()>,

/// Handler making sure we only have one group session sharing request in
/// flight per room.
#[cfg(feature = "e2e-encryption")]
pub(crate) group_session_deduplicated_handler: DeduplicatingHandler<OwnedRoomId>,

/// Lock making sure we're only doing one key claim request at a time.
#[cfg(feature = "e2e-encryption")]
pub(crate) key_claim_lock: Mutex<()>,

/// Handler to ensure that only one members request is running at a time,
/// given a room.
pub(crate) members_request_deduplicated_handler: DeduplicatingHandler<OwnedRoomId>,

/// Handler to ensure that only one encryption state request is running at a
/// time, given a room.
pub(crate) encryption_state_deduplicated_handler: DeduplicatingHandler<OwnedRoomId>,
Expand All @@ -203,6 +211,7 @@ pub(crate) struct ClientLocks {
#[cfg(feature = "e2e-encryption")]
pub(crate) cross_process_crypto_store_lock:
OnceCell<CrossProcessStoreLock<LockableCryptoStore>>,

/// Latest "generation" of data known by the crypto store.
///
/// This is a counter that only increments, set in the database (and can
Expand Down
Loading