From 182174bcb13d42630ca68465cd643c1b372e8107 Mon Sep 17 00:00:00 2001 From: Brendan McMillion Date: Fri, 29 Dec 2023 17:24:37 -0800 Subject: [PATCH] Fix linting errors. --- openmls/src/credentials/codec.rs | 3 +-- openmls/src/group/mod.rs | 4 ---- openmls/src/prelude.rs | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/openmls/src/credentials/codec.rs b/openmls/src/credentials/codec.rs index c4169936d4..0cc8df9169 100644 --- a/openmls/src/credentials/codec.rs +++ b/openmls/src/credentials/codec.rs @@ -31,8 +31,7 @@ impl tls_codec::Serialize for Credential { impl tls_codec::Deserialize for Credential { fn tls_deserialize(bytes: &mut R) -> Result { let val = u16::tls_deserialize(bytes)?; - let credential_type = CredentialType::try_from(val) - .map_err(|e| tls_codec::Error::DecodingError(e.to_string()))?; + let credential_type = CredentialType::from(val); match credential_type { CredentialType::Basic => Ok(Credential::from(MlsCredentialType::Basic( BasicCredential::tls_deserialize(bytes)?, diff --git a/openmls/src/group/mod.rs b/openmls/src/group/mod.rs index 5ffde23222..7dd3554644 100644 --- a/openmls/src/group/mod.rs +++ b/openmls/src/group/mod.rs @@ -29,10 +29,8 @@ pub(crate) mod errors; pub use core_group::proposals::*; pub use core_group::staged_commit::StagedCommit; pub use errors::*; -pub use group_context::*; pub use mls_group::config::*; pub use mls_group::membership::*; -pub use mls_group::processing::*; pub use mls_group::*; pub use public_group::*; @@ -44,8 +42,6 @@ pub(crate) mod tests; #[cfg(any(feature = "test-utils", test))] pub use group_context::GroupContext; use openmls_traits::random::OpenMlsRand; -#[cfg(any(feature = "test-utils", test))] -pub use proposals::*; /// A group ID. The group ID is chosen by the creator of the group and should be globally unique. #[derive( diff --git a/openmls/src/prelude.rs b/openmls/src/prelude.rs index de04bfffe6..aef1064837 100644 --- a/openmls/src/prelude.rs +++ b/openmls/src/prelude.rs @@ -4,7 +4,7 @@ // MlsGroup pub use crate::group::{config::CryptoConfig, core_group::Member, ser::*, *}; -pub use crate::group::public_group::{errors::*, process::*, *}; +pub use crate::group::public_group::errors::*; // Ciphersuite pub use crate::ciphersuite::{hash_ref::KeyPackageRef, signable::*, signature::*, *}; @@ -22,7 +22,7 @@ pub use crate::versions::*; pub use crate::extensions::{errors::*, *}; // Framing -pub use crate::framing::{message_in::*, message_out::*, sender::*, validation::*, *}; +pub use crate::framing::*; // Key packages pub use crate::key_packages::{errors::*, *};