Fix reversed arguments in PartialOrd impls (#358)

This commit is contained in:
Andrew Tunnell-Jones
2020-01-23 10:06:00 -08:00
committed by Sean McArthur
parent 788cb158ce
commit 939a5edf3d
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -1322,7 +1322,7 @@ impl PartialEq<BytesMut> for [u8] {
impl PartialOrd<BytesMut> for [u8] {
fn partial_cmp(&self, other: &BytesMut) -> Option<cmp::Ordering> {
other.partial_cmp(self)
<[u8] as PartialOrd<[u8]>>::partial_cmp(self, other)
}
}
@@ -1346,7 +1346,7 @@ impl PartialEq<BytesMut> for str {
impl PartialOrd<BytesMut> for str {
fn partial_cmp(&self, other: &BytesMut) -> Option<cmp::Ordering> {
other.partial_cmp(self)
<[u8] as PartialOrd<[u8]>>::partial_cmp(self.as_bytes(), other)
}
}
@@ -1394,7 +1394,7 @@ impl PartialEq<BytesMut> for String {
impl PartialOrd<BytesMut> for String {
fn partial_cmp(&self, other: &BytesMut) -> Option<cmp::Ordering> {
other.partial_cmp(self)
<[u8] as PartialOrd<[u8]>>::partial_cmp(self.as_bytes(), other)
}
}
@@ -1422,7 +1422,7 @@ impl PartialEq<BytesMut> for &[u8] {
impl PartialOrd<BytesMut> for &[u8] {
fn partial_cmp(&self, other: &BytesMut) -> Option<cmp::Ordering> {
other.partial_cmp(self)
<[u8] as PartialOrd<[u8]>>::partial_cmp(self, other)
}
}