Skip to content

Commit

Permalink
signature: remove AsMut bound on Repr (#1144)
Browse files Browse the repository at this point in the history
Without a `Default` bound (#1143) there's little purpose to having an
`AsMut` bound on `Repr`, which would allow `Default` to construct an
empty bytestring and `AsMut` used to write into it.

Given there isn't an obvious use case, fewer bounds are better.
  • Loading branch information
tarcieri authored Oct 30, 2022
1 parent cdf6677 commit f791730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion signature/src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub trait SignatureEncoding:
Clone + Sized + for<'a> TryFrom<&'a [u8], Error = Error> + Into<Self::Repr>
{
/// Byte representation of a signature.
type Repr: 'static + AsRef<[u8]> + AsMut<[u8]> + Clone + Send + Sync;
type Repr: 'static + AsRef<[u8]> + Clone + Send + Sync;

/// Decode signature from its byte representation.
fn from_bytes(bytes: &Self::Repr) -> Result<Self> {
Expand Down

0 comments on commit f791730

Please sign in to comment.