Skip to content

Commit

Permalink
ed25519: have TryFrom<&[u8]> call Signature::from_slice (#626)
Browse files Browse the repository at this point in the history
The code is otherwise duplicated
  • Loading branch information
tarcieri authored Jan 21, 2023
1 parent b2ed941 commit faeee55
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ed25519/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ impl TryFrom<&[u8]> for Signature {
type Error = Error;

fn try_from(bytes: &[u8]) -> signature::Result<Self> {
SignatureBytes::try_from(bytes)
.map(Into::into)
.map_err(|_| Error::new())
Self::from_slice(bytes)
}
}

Expand Down

0 comments on commit faeee55

Please sign in to comment.