Skip to content

Commit

Permalink
Rollup merge of #108660 - xfix:remove-ne-method-from-str, r=thomcc
Browse files Browse the repository at this point in the history
Remove ne implementations from strings

As far as I can tell, there isn't really a reason for those.
  • Loading branch information
Dylan-DPC authored Mar 4, 2023
2 parents 2fc4935 + e248d0c commit e700d02
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2213,10 +2213,6 @@ impl PartialEq for String {
fn eq(&self, other: &String) -> bool {
PartialEq::eq(&self[..], &other[..])
}
#[inline]
fn ne(&self, other: &String) -> bool {
PartialEq::ne(&self[..], &other[..])
}
}

macro_rules! impl_eq {
Expand Down
4 changes: 0 additions & 4 deletions library/core/src/str/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ impl PartialEq for str {
fn eq(&self, other: &str) -> bool {
self.as_bytes() == other.as_bytes()
}
#[inline]
fn ne(&self, other: &str) -> bool {
!(*self).eq(other)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit e700d02

Please sign in to comment.