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 {
|
fn eq(&self, other: &String) -> bool {
|
||||||
PartialEq::eq(&self[..], &other[..])
|
PartialEq::eq(&self[..], &other[..])
|
||||||
}
|
}
|
||||||
#[inline]
|
|
||||||
fn ne(&self, other: &String) -> bool {
|
|
||||||
PartialEq::ne(&self[..], &other[..])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! impl_eq {
|
macro_rules! impl_eq {
|
||||||
|
@ -28,10 +28,6 @@ impl PartialEq for str {
|
|||||||
fn eq(&self, other: &str) -> bool {
|
fn eq(&self, other: &str) -> bool {
|
||||||
self.as_bytes() == other.as_bytes()
|
self.as_bytes() == other.as_bytes()
|
||||||
}
|
}
|
||||||
#[inline]
|
|
||||||
fn ne(&self, other: &str) -> bool {
|
|
||||||
!(*self).eq(other)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user