Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon committed Feb 24, 2024
1 parent 0f8b95f commit c89d602
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions presage-store-sled/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ impl ContentsStore for SledStore {
fn group_avatar(
&self,
master_key_bytes: GroupMasterKeyBytes,
) -> Result<Option<Vec<u8>>, SledStoreError> {
) -> Result<Option<AvatarBytes>, SledStoreError> {
self.get(SLED_TREE_GROUP_AVATARS, master_key_bytes)
}

Expand Down Expand Up @@ -647,7 +647,7 @@ impl ContentsStore for SledStore {
&self,
uuid: Uuid,
key: ProfileKey,
) -> Result<Option<Vec<u8>>, SledStoreError> {
) -> Result<Option<AvatarBytes>, SledStoreError> {
let key = self.profile_key_for_uuid(uuid, key);
self.get(SLED_TREE_PROFILE_AVATARS, key)
}
Expand Down
1 change: 1 addition & 0 deletions presage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ pub use errors::Error;
pub use manager::Manager;

const USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "-rs-", env!("CARGO_PKG_VERSION"));

pub type AvatarBytes = Vec<u8>;
6 changes: 2 additions & 4 deletions presage/src/manager/registered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ impl<S: Store> Manager<S, Registered> {
let Some(group) = upsert_group(
self.store(),
&mut gm,
&context.master_key(),
context.master_key(),
&context.revision(),
)
.await?
Expand All @@ -506,9 +506,7 @@ impl<S: Store> Manager<S, Registered> {
let avatar = gm
.retrieve_avatar(
&group.avatar,
GroupSecretParams::derive_from_master_key(GroupMasterKey::new(
master_key_bytes.clone(),
)),
GroupSecretParams::derive_from_master_key(GroupMasterKey::new(master_key_bytes)),
)
.await?;
if let Some(avatar) = &avatar {
Expand Down

0 comments on commit c89d602

Please sign in to comment.