From 2151fcdbe84c09c051a9c42ae9761620c63e1822 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 3 Dec 2024 18:03:46 +0100 Subject: [PATCH] refact: avoid using multiple copies of the PrivOwnedStr struct --- .../matrix-sdk/src/authentication/qrcode/messages.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/matrix-sdk/src/authentication/qrcode/messages.rs b/crates/matrix-sdk/src/authentication/qrcode/messages.rs index 6ea48198823..2abbef5a979 100644 --- a/crates/matrix-sdk/src/authentication/qrcode/messages.rs +++ b/crates/matrix-sdk/src/authentication/qrcode/messages.rs @@ -13,6 +13,7 @@ // limitations under the License. use matrix_sdk_base::crypto::types::SecretsBundle; +use matrix_sdk_common::deserialized_responses::PrivOwnedStr; use openidconnect::{ core::CoreDeviceAuthorizationResponse, EndUserVerificationUrl, VerificationUriComplete, }; @@ -183,15 +184,6 @@ where s.serialize_str(&key.to_base64()) } -// Wrapper around `Box` that cannot be used in a meaningful way outside of -// this crate. Used for string enums because their `_Custom` variant can't be -// truly private (only `#[doc(hidden)]`). -// TODO: It probably makes sense to move the above messages into Ruma, if for -// nothing else, to get rid of this `PrivOwnedStr`. -#[doc(hidden)] -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct PrivOwnedStr(Box); - #[cfg(test)] mod test { use assert_matches2::assert_let;