Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
qrayven committed Aug 4, 2023
1 parent ccc91e7 commit 8d2b52b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sdk/src/types/block/output/feature/block_issuer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ mod dto {
fn from(value: &BlockIssuerFeature) -> Self {
Self {
kind: BlockIssuerFeature::KIND,
expiry_slot: value.expiry_slot.into(),
expiry_slot: value.expiry_slot,
keys: value.public_keys.iter().map(|key| key.into()).collect(),
}
}
Expand Down
6 changes: 2 additions & 4 deletions sdk/src/types/block/public_key/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ pub(crate) type PublicKeyCount = BoundedU8<{ *PublicKeys::COUNT_RANGE.start() },
pub struct PublicKeys(#[packable(verify_with = verify_public_keys)] BoxedSlicePrefix<PublicKey, PublicKeyCount>);

fn verify_public_keys<const VERIFY: bool>(public_keys: &[PublicKey], _visitor: &()) -> Result<(), Error> {
if VERIFY {
if !is_unique_sorted(public_keys.iter()) {
return Err(Error::PublicKeysNotUniqueSorted);
}
if VERIFY && !is_unique_sorted(public_keys.iter()) {
return Err(Error::PublicKeysNotUniqueSorted);
}

Ok(())
Expand Down

0 comments on commit 8d2b52b

Please sign in to comment.