Skip to content

Commit

Permalink
fix clippy warning for non-canonical-partial-ord
Browse files Browse the repository at this point in the history
  • Loading branch information
V0ldek committed Mar 7, 2024
1 parent 4abc0ff commit 6538ac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/bytes/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ impl<A: Alignment, const N: usize> PartialEq<[u8; N]> for AlignedBytes<A> {
impl<A: Alignment> PartialOrd for AlignedBytes<A> {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
let slice: &AlignedSlice<A> = self;
let other_slice: &AlignedSlice<A> = other;

slice.partial_cmp(other_slice)
Some(self.cmp(other))
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/slice/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ impl<A: Alignment, const N: usize> PartialEq<AlignedSlice<A>> for [u8; N] {
impl<A: Alignment> PartialOrd for AlignedSlice<A> {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
let slice: &[u8] = self;
let other_slice: &[u8] = other;

slice.partial_cmp(other_slice)
Some(self.cmp(other))
}
}

Expand Down

0 comments on commit 6538ac8

Please sign in to comment.