Skip to content

Commit

Permalink
Revert "Implement comparisons without allocating"
Browse files Browse the repository at this point in the history
This reverts commit 6430e27.
  • Loading branch information
mkroening committed Feb 19, 2024
1 parent d0439ea commit 37205fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/drivers/virtio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ pub mod features {

impl PartialEq<Features> for u64 {
fn eq(&self, other: &Features) -> bool {
self == other
*self == u64::from(*other)
}
}

impl PartialEq<u64> for Features {
fn eq(&self, other: &u64) -> bool {
self == other
u64::from(*self) == *other
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/virtio/virtqueue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,7 @@ impl BitAnd<DescrFlags> for u16 {

impl PartialEq<DescrFlags> for u16 {
fn eq(&self, other: &DescrFlags) -> bool {
self == other
*self == u16::from(*other)
}
}

Expand Down

0 comments on commit 37205fc

Please sign in to comment.