crypto: Fix some clippy warnings.

master
Damir Jelić 2020-08-11 13:38:20 +02:00
parent eeb6a811c0
commit db553b2040
2 changed files with 3 additions and 2 deletions

View File

@ -969,7 +969,7 @@ impl OlmMachine {
panic!("Session is already shared"); panic!("Session is already shared");
} }
// TODO don't mark the session as shared automatically only, when all // TODO don't mark the session as shared automatically, only when all
// the requests are done, failure to send these requests will likely end // the requests are done, failure to send these requests will likely end
// up in wedged sessions. We'll need to store the requests and let the // up in wedged sessions. We'll need to store the requests and let the
// caller mark them as sent using an UUID. // caller mark them as sent using an UUID.
@ -986,7 +986,6 @@ impl OlmMachine {
.await? .await?
.devices() .devices()
{ {
// TODO abort if the device isn't verified
devices.push(device.clone()); devices.push(device.clone());
} }
} }

View File

@ -62,6 +62,7 @@ impl SessionStore {
/// Get all the sessions that belong to the given sender key. /// Get all the sessions that belong to the given sender key.
pub fn get(&self, sender_key: &str) -> Option<Arc<Mutex<Vec<Session>>>> { pub fn get(&self, sender_key: &str) -> Option<Arc<Mutex<Vec<Session>>>> {
#[allow(clippy::map_clone)]
self.entries.get(sender_key).map(|s| s.clone()) self.entries.get(sender_key).map(|s| s.clone())
} }
@ -75,6 +76,7 @@ impl SessionStore {
#[derive(Debug, Default, Clone)] #[derive(Debug, Default, Clone)]
/// In-memory store that holds inbound group sessions. /// In-memory store that holds inbound group sessions.
pub struct GroupSessionStore { pub struct GroupSessionStore {
#[allow(clippy::type_complexity)]
entries: Arc<DashMap<RoomId, HashMap<String, HashMap<String, InboundGroupSession>>>>, entries: Arc<DashMap<RoomId, HashMap<String, HashMap<String, InboundGroupSession>>>>,
} }