crypto: Fix some clippy warnings

master
Damir Jelić 2021-08-13 13:18:34 +02:00
parent 00e11d33f1
commit 9bae87b0ac
3 changed files with 9 additions and 9 deletions

View File

@ -1306,8 +1306,8 @@ mod test {
.await .await
.unwrap(); .unwrap();
group_session.mark_shared_with( group_session.mark_shared_with(
&alice_device.user_id(), alice_device.user_id(),
&alice_device.device_id(), alice_device.device_id(),
alice_device.get_key(DeviceKeyAlgorithm::Curve25519).unwrap(), alice_device.get_key(DeviceKeyAlgorithm::Curve25519).unwrap(),
); );

View File

@ -1022,7 +1022,7 @@ pub(crate) mod test {
Arc::new(Mutex::new(PrivateCrossSigningIdentity::empty(second.user_id().clone()))); Arc::new(Mutex::new(PrivateCrossSigningIdentity::empty(second.user_id().clone())));
let verification_machine = VerificationMachine::new( let verification_machine = VerificationMachine::new(
ReadOnlyAccount::new(second.user_id(), second.device_id()), ReadOnlyAccount::new(second.user_id(), second.device_id()),
private_identity.clone(), private_identity,
Arc::new(MemoryStore::new()), Arc::new(MemoryStore::new()),
); );

View File

@ -1282,7 +1282,7 @@ mod test {
let alice_store: Box<dyn CryptoStore> = Box::new(MemoryStore::new()); let alice_store: Box<dyn CryptoStore> = Box::new(MemoryStore::new());
let alice_identity = PrivateCrossSigningIdentity::empty(alice_id()); let alice_identity = PrivateCrossSigningIdentity::empty(alice_id());
let alice_store = VerificationStore { account: alice.clone(), inner: alice_store.into() }; let alice_store = VerificationStore { account: alice, inner: alice_store.into() };
let bob = ReadOnlyAccount::new(&bob_id(), &bob_device_id()); let bob = ReadOnlyAccount::new(&bob_id(), &bob_device_id());
let bob_store: Box<dyn CryptoStore> = Box::new(MemoryStore::new()); let bob_store: Box<dyn CryptoStore> = Box::new(MemoryStore::new());
@ -1308,7 +1308,7 @@ mod test {
let alice_request = VerificationRequest::from_request( let alice_request = VerificationRequest::from_request(
VerificationCache::new(), VerificationCache::new(),
alice_identity, alice_identity,
alice_store.into(), alice_store,
&bob_id(), &bob_id(),
flow_id, flow_id,
&(&content).into(), &(&content).into(),
@ -1358,7 +1358,7 @@ mod test {
let bob_request = VerificationRequest::new( let bob_request = VerificationRequest::new(
VerificationCache::new(), VerificationCache::new(),
bob_identity, bob_identity,
bob_store.into(), bob_store,
flow_id.clone(), flow_id.clone(),
&alice_id(), &alice_id(),
vec![], vec![],
@ -1368,7 +1368,7 @@ mod test {
let alice_request = VerificationRequest::from_request( let alice_request = VerificationRequest::from_request(
VerificationCache::new(), VerificationCache::new(),
alice_identity, alice_identity,
alice_store.into(), alice_store,
&bob_id(), &bob_id(),
flow_id, flow_id,
&(&content).into(), &(&content).into(),
@ -1425,7 +1425,7 @@ mod test {
let bob_request = VerificationRequest::new( let bob_request = VerificationRequest::new(
VerificationCache::new(), VerificationCache::new(),
bob_identity, bob_identity,
bob_store.into(), bob_store,
flow_id, flow_id,
&alice_id(), &alice_id(),
vec![], vec![],
@ -1440,7 +1440,7 @@ mod test {
let alice_request = VerificationRequest::from_request( let alice_request = VerificationRequest::from_request(
VerificationCache::new(), VerificationCache::new(),
alice_identity, alice_identity,
alice_store.into(), alice_store,
&bob_id(), &bob_id(),
flow_id, flow_id,
&content, &content,