mirror of
https://github.com/openharmony/third_party_rust_bytes.git
synced 2026-07-20 01:13:36 -04:00
Fix reversed arguments in PartialOrd impls (#358)
This commit is contained in:
committed by
Sean McArthur
parent
1efd9958a3
commit
5369a989a4
+6
-6
@@ -626,7 +626,7 @@ impl PartialEq<Bytes> for [u8] {
|
||||
|
||||
impl PartialOrd<Bytes> for [u8] {
|
||||
fn partial_cmp(&self, other: &Bytes) -> Option<cmp::Ordering> {
|
||||
other.partial_cmp(self)
|
||||
<[u8] as PartialOrd<[u8]>>::partial_cmp(self, other)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ impl PartialEq<Bytes> for str {
|
||||
|
||||
impl PartialOrd<Bytes> for str {
|
||||
fn partial_cmp(&self, other: &Bytes) -> Option<cmp::Ordering> {
|
||||
other.partial_cmp(self)
|
||||
<[u8] as PartialOrd<[u8]>>::partial_cmp(self.as_bytes(), other)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ impl PartialEq<Bytes> for Vec<u8> {
|
||||
|
||||
impl PartialOrd<Bytes> for Vec<u8> {
|
||||
fn partial_cmp(&self, other: &Bytes) -> Option<cmp::Ordering> {
|
||||
other.partial_cmp(self)
|
||||
<[u8] as PartialOrd<[u8]>>::partial_cmp(self, other)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ impl PartialEq<Bytes> for String {
|
||||
|
||||
impl PartialOrd<Bytes> for String {
|
||||
fn partial_cmp(&self, other: &Bytes) -> Option<cmp::Ordering> {
|
||||
other.partial_cmp(self)
|
||||
<[u8] as PartialOrd<[u8]>>::partial_cmp(self.as_bytes(), other)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ impl PartialEq<Bytes> for &[u8] {
|
||||
|
||||
impl PartialOrd<Bytes> for &[u8] {
|
||||
fn partial_cmp(&self, other: &Bytes) -> Option<cmp::Ordering> {
|
||||
other.partial_cmp(self)
|
||||
<[u8] as PartialOrd<[u8]>>::partial_cmp(self, other)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,7 +722,7 @@ impl PartialEq<Bytes> for &str {
|
||||
|
||||
impl PartialOrd<Bytes> for &str {
|
||||
fn partial_cmp(&self, other: &Bytes) -> Option<cmp::Ordering> {
|
||||
other.partial_cmp(self)
|
||||
<[u8] as PartialOrd<[u8]>>::partial_cmp(self.as_bytes(), other)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user