From c307690c2e68c5972009d729823f90abe2504619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 20 Aug 2020 16:06:06 +0200 Subject: [PATCH] crypto: Fix a clippy warning and some spelling. --- matrix_sdk_crypto/src/machine.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index c36e1ab1..12c5c431 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -558,7 +558,7 @@ impl OlmMachine { || user_signing.user_id() != user_id { warn!( - "User id missmatch in one of the cross signing keys for user {}", + "User id mismatch in one of the cross signing keys for user {}", user_id ); continue; @@ -574,16 +574,14 @@ impl OlmMachine { ); continue; } + } else if master_key.user_id() != user_id || self_signing.user_id() != user_id { + warn!( + "User id mismatch in one of the cross signing keys for user {}", + user_id + ); + continue; } else { - if master_key.user_id() != user_id || self_signing.user_id() != user_id { - warn!( - "User id missmatch in one of the cross signing keys for user {}", - user_id - ); - continue; - } else { - UserIdentity::new(master_key, self_signing).map(UserIdentities::Other) - } + UserIdentity::new(master_key, self_signing).map(UserIdentities::Other) }; match identity {