From 3eda99e9efbdfc2cb0e20932f20018d53baf5a64 Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 17 Jul 2022 17:32:54 +0200 Subject: make the Clone bytes types Copy as well u8 arrays are copy, no need to not have our wrappers be copy. --- src/crypto.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/crypto.rs') diff --git a/src/crypto.rs b/src/crypto.rs index 58ab6d2..a188f46 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -111,7 +111,7 @@ impl StretchedPW { } } -#[derive(Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] pub(crate) struct SessionToken(#[serde(with = "as_hex")] [u8; 32]); impl Debug for SessionToken { @@ -138,7 +138,7 @@ impl SessionCredentials { } } -#[derive(Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] pub(crate) struct KeyFetchToken(#[serde(with = "as_hex")] [u8; 32]); impl Debug for KeyFetchToken { @@ -222,7 +222,7 @@ impl WrappedKeyBundle { } } -#[derive(Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] pub(crate) struct PasswordChangeToken(#[serde(with = "as_hex")] [u8; 32]); impl Debug for PasswordChangeToken { @@ -254,7 +254,7 @@ impl PasswordChangeReq { } } -#[derive(Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] pub(crate) struct AccountResetToken(#[serde(with = "as_hex")] [u8; 32]); impl Debug for AccountResetToken { -- cgit v1.2.3