Skip to content

Commit

Permalink
Delete CxxString heterogeneous PartialOrd impls
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 18, 2021
1 parent 05db2fb commit 94e2054
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/cxx_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,6 @@ impl PartialOrd for CxxString {
}
}

impl PartialOrd<str> for CxxString {
fn partial_cmp(&self, other: &str) -> Option<Ordering> {
self.as_bytes().partial_cmp(other.as_bytes())
}
}

impl PartialOrd<CxxString> for str {
fn partial_cmp(&self, other: &CxxString) -> Option<Ordering> {
self.as_bytes().partial_cmp(other.as_bytes())
}
}

impl Ord for CxxString {
fn cmp(&self, other: &Self) -> Ordering {
self.as_bytes().cmp(other.as_bytes())
Expand Down

0 comments on commit 94e2054

Please sign in to comment.