From 15ebc95cd0b6ee7e141323f50fa073f1fbfafa34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 25 May 2022 13:52:22 +0200 Subject: [PATCH] chore(qrcode): Add more missing Eq implementations --- crates/matrix-sdk-crypto/src/types/cross_signing_key.rs | 2 +- crates/matrix-sdk-crypto/src/types/device_keys.rs | 2 +- crates/matrix-sdk-qrcode/src/types.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/matrix-sdk-crypto/src/types/cross_signing_key.rs b/crates/matrix-sdk-crypto/src/types/cross_signing_key.rs index 753b09ff2..d1f74820c 100644 --- a/crates/matrix-sdk-crypto/src/types/cross_signing_key.rs +++ b/crates/matrix-sdk-crypto/src/types/cross_signing_key.rs @@ -77,7 +77,7 @@ impl CrossSigningKey { /// Currently cross signing keys support an ed25519 keypair. The keys transport /// format is a base64 encoded string, any unknown key type will be left as such /// a string. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum SigningKey { /// The ed25519 cross-signing key. Ed25519(Ed25519PublicKey), diff --git a/crates/matrix-sdk-crypto/src/types/device_keys.rs b/crates/matrix-sdk-crypto/src/types/device_keys.rs index aa558f153..6a60be23c 100644 --- a/crates/matrix-sdk-crypto/src/types/device_keys.rs +++ b/crates/matrix-sdk-crypto/src/types/device_keys.rs @@ -115,7 +115,7 @@ impl UnsignedDeviceInfo { /// Currently devices have a curve25519 and ed25519 keypair. The keys transport /// format is a base64 encoded string, any unknown key type will be left as such /// a string. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum DeviceKey { /// The curve25519 device key. Curve25519(Curve25519PublicKey), diff --git a/crates/matrix-sdk-qrcode/src/types.rs b/crates/matrix-sdk-qrcode/src/types.rs index a94e7f5d8..26dc4ef25 100644 --- a/crates/matrix-sdk-qrcode/src/types.rs +++ b/crates/matrix-sdk-qrcode/src/types.rs @@ -32,7 +32,7 @@ use crate::{ }; /// An enum representing the different modes a QR verification can be in. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum QrVerificationData { /// The QR verification is verifying another user Verification(VerificationData), @@ -375,7 +375,7 @@ impl QrVerificationData { /// /// This mode is used for verification between two users using their master /// cross signing keys. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct VerificationData { event_id: OwnedEventId, first_master_key: Ed25519PublicKey, @@ -474,7 +474,7 @@ impl From for QrVerificationData { /// This mode is used for verification between two devices of the same user /// where this device, that is creating this QR code, is trusting or owning /// the cross signing master key. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct SelfVerificationData { transaction_id: String, master_key: Ed25519PublicKey, @@ -577,7 +577,7 @@ impl From for QrVerificationData { /// This mode is used for verification between two devices of the same user /// where this device, that is creating this QR code, is not trusting the /// cross signing master key. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct SelfVerificationNoMasterKey { transaction_id: String, device_key: Ed25519PublicKey,