mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Rollup merge of #108660 - xfix:remove-ne-method-from-str, r=thomcc
Remove ne implementations from strings As far as I can tell, there isn't really a reason for those.
This commit is contained in:
commit
e700d02374
@ -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 {
|
||||
|
@ -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")]
|
||||
|
Loading…
Reference in New Issue
Block a user