Skip to content

Commit

Permalink
remove unecessary try_into()
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed May 19, 2024
1 parent 57ad3bd commit 9157cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/did-simple/src/methods/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl TryFrom<DidUri> for DidKey {
// TODO: Instead of comparing decoded versions which requires running the decode
// function at runtime, compare the encoded versions. We can do the encode at
// compile time.
let multicodec_key_type = decode_varint(decoded[0..2].try_into().unwrap())?;
let multicodec_key_type = decode_varint(&decoded[0..2])?;
let key_algo = match multicodec_key_type {
Ed25519::MULTICODEC_VALUE => DynKeyAlgo::Ed25519,
_ => return Err(FromUriError::UnknownKeyAlgo(multicodec_key_type)),
Expand Down

0 comments on commit 9157cf9

Please sign in to comment.