mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-13 18:45:44 -04:00
crypto: Provide DerefMut on OwnUserIdentity and UserIdentity
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
ops::Deref,
|
||||
ops::{Deref, DerefMut},
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc, RwLock,
|
||||
@@ -169,6 +169,12 @@ impl Deref for OwnUserIdentity {
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for OwnUserIdentity {
|
||||
fn deref_mut(&mut self) -> &mut <Self as Deref>::Target {
|
||||
&mut self.inner
|
||||
}
|
||||
}
|
||||
|
||||
impl OwnUserIdentity {
|
||||
/// Mark our user identity as verified.
|
||||
///
|
||||
@@ -282,6 +288,12 @@ impl Deref for OtherUserIdentity {
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for OtherUserIdentity {
|
||||
fn deref_mut(&mut self) -> &mut <Self as Deref>::Target {
|
||||
&mut self.inner
|
||||
}
|
||||
}
|
||||
|
||||
impl OtherUserIdentity {
|
||||
/// Is this user identity verified.
|
||||
pub fn is_verified(&self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user