Skip to content

Commit

Permalink
Allow FromBytes::Bytes to be unsized
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Jul 20, 2023
1 parent c89a430 commit bbeeaa2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ops/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pub trait NumBytes:
+ Hash
+ Borrow<[u8]>
+ BorrowMut<[u8]>
+ Default
{
}

Expand All @@ -31,7 +30,7 @@ impl<T> NumBytes for T where
+ Hash
+ Borrow<[u8]>
+ BorrowMut<[u8]>
+ Default
+ ?Sized
{
}

Expand Down Expand Up @@ -94,7 +93,7 @@ pub trait ToBytes {
}

pub trait FromBytes: Sized {
type Bytes: NumBytes;
type Bytes: NumBytes + ?Sized;

/// Create a number from its representation as a byte array in big endian.
///
Expand Down

0 comments on commit bbeeaa2

Please sign in to comment.