Skip to content

Commit

Permalink
Fix linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bren2010 committed Dec 30, 2023
1 parent a57dc96 commit 57d2a60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 1 addition & 2 deletions openmls/src/credentials/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ impl tls_codec::Serialize for Credential {
impl tls_codec::Deserialize for Credential {
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, tls_codec::Error> {
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)?,
Expand Down
7 changes: 1 addition & 6 deletions openmls/src/group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ 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 group_context::GroupContext;
pub use mls_group::config::*;
pub use mls_group::membership::*;
pub use mls_group::processing::*;
pub use mls_group::*;
pub use public_group::*;

Expand All @@ -41,11 +40,7 @@ pub use public_group::*;
pub(crate) use core_group::create_commit_params::*;
#[cfg(any(feature = "test-utils", test))]
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(
Expand Down
4 changes: 2 additions & 2 deletions openmls/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*, *};
Expand All @@ -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::*, *};
Expand Down

0 comments on commit 57d2a60

Please sign in to comment.