diff --git a/crates/matrix-sdk-crypto/src/error.rs b/crates/matrix-sdk-crypto/src/error.rs index 44cd7292d..40b081f60 100644 --- a/crates/matrix-sdk-crypto/src/error.rs +++ b/crates/matrix-sdk-crypto/src/error.rs @@ -119,10 +119,10 @@ pub enum EventError { MissingField(String), #[error("the sender of the plaintext doesn't match the sender of the encrypted message.")] - MissmatchedSender, + MismatchedSender, #[error("the keys of the message don't match the keys in our database.")] - MissmatchedKeys, + MismatchedKeys, } #[derive(Error, Debug)] diff --git a/crates/matrix-sdk-crypto/src/olm/account.rs b/crates/matrix-sdk-crypto/src/olm/account.rs index fc990e298..60c31bb9a 100644 --- a/crates/matrix-sdk-crypto/src/olm/account.rs +++ b/crates/matrix-sdk-crypto/src/olm/account.rs @@ -430,7 +430,7 @@ impl Account { )?; if &recipient != self.user_id() || sender != &encrypted_sender { - return Err(EventError::MissmatchedSender.into()); + return Err(EventError::MismatchedSender.into()); } if self.inner.identity_keys().ed25519() @@ -438,7 +438,7 @@ impl Account { .get(&DeviceKeyAlgorithm::Ed25519) .ok_or(EventError::MissingSigningKey)? { - return Err(EventError::MissmatchedKeys.into()); + return Err(EventError::MismatchedKeys.into()); } let signing_key = diff --git a/crates/matrix-sdk-crypto/src/olm/signing/mod.rs b/crates/matrix-sdk-crypto/src/olm/signing/mod.rs index 49a41b28a..404601f08 100644 --- a/crates/matrix-sdk-crypto/src/olm/signing/mod.rs +++ b/crates/matrix-sdk-crypto/src/olm/signing/mod.rs @@ -225,7 +225,7 @@ impl PrivateCrossSigningIdentity { if public_identity.master_key() == &master.public_key { Ok(Some(master)) } else { - Err(SecretImportError::MissmatchedPublicKeys) + Err(SecretImportError::MismatchedPublicKeys) } } else { Ok(None) @@ -238,7 +238,7 @@ impl PrivateCrossSigningIdentity { if public_identity.user_signing_key() == &subkey.public_key { Ok(Some(subkey)) } else { - Err(SecretImportError::MissmatchedPublicKeys) + Err(SecretImportError::MismatchedPublicKeys) } } else { Ok(None) @@ -251,7 +251,7 @@ impl PrivateCrossSigningIdentity { if public_identity.self_signing_key() == &subkey.public_key { Ok(Some(subkey)) } else { - Err(SecretImportError::MissmatchedPublicKeys) + Err(SecretImportError::MismatchedPublicKeys) } } else { Ok(None) diff --git a/crates/matrix-sdk-crypto/src/store/mod.rs b/crates/matrix-sdk-crypto/src/store/mod.rs index c8b1976b9..13da23044 100644 --- a/crates/matrix-sdk-crypto/src/store/mod.rs +++ b/crates/matrix-sdk-crypto/src/store/mod.rs @@ -173,7 +173,7 @@ pub enum SecretImportError { "The public key of the imported private key doesn't match to the \ public key that was uploaded to the server" )] - MissmatchedPublicKeys, + MismatchedPublicKeys, /// The new version of the identity couldn't be stored. #[error(transparent)] Store(#[from] CryptoStoreError),