crypto: Simplify the signature loading in the sqlite cryptostore.
parent
8b56546565
commit
65843f89dc
|
@ -551,15 +551,13 @@ impl SqliteStore {
|
||||||
|
|
||||||
let signature = row.2;
|
let signature = row.2;
|
||||||
|
|
||||||
if !signatures.contains_key(&user_id) {
|
signatures
|
||||||
let _ = signatures.insert(user_id.clone(), BTreeMap::new());
|
.entry(user_id)
|
||||||
}
|
.or_insert_with(BTreeMap::new)
|
||||||
let user_map = signatures.get_mut(&user_id).unwrap();
|
.insert(
|
||||||
|
DeviceKeyId::from_parts(key_algorithm, device_id.as_str().into()),
|
||||||
user_map.insert(
|
signature.to_owned(),
|
||||||
DeviceKeyId::from_parts(key_algorithm, device_id.as_str().into()),
|
);
|
||||||
signature.to_owned(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let device = ReadOnlyDevice::new(
|
let device = ReadOnlyDevice::new(
|
||||||
|
|
Loading…
Reference in New Issue