matrix-sdk-crypto: Fix map_clone clippy warning

master
Devin R 2020-07-17 15:43:06 -04:00
parent e4f94cbfec
commit e27b6fb51e
1 changed files with 2 additions and 1 deletions

View File

@ -199,6 +199,7 @@ impl DeviceStore {
}
/// Get a read-only view over all devices of the given user.
#[allow(clippy::map_clone)]
pub fn user_devices(&self, user_id: &UserId) -> UserDevices {
if !self.entries.contains_key(user_id) {
self.entries.insert(user_id.clone(), DashMap::new());
@ -207,7 +208,7 @@ impl DeviceStore {
entries: self
.entries
.get(user_id)
.map(|d| d.clone()) // TODO I'm sure this is not ok but I'm not sure what to do??
.map(|map| map.clone()) // TODO I'm sure this is not ok but I'm not sure what to do??
.unwrap()
.into_read_only(),
}