Skip to content

Commit e700d02

Browse files
authored
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.
2 parents 2fc4935 + e248d0c commit e700d02

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

library/alloc/src/string.rs

-4
Original file line numberDiff line numberDiff line change
@@ -2213,10 +2213,6 @@ impl PartialEq for String {
22132213
fn eq(&self, other: &String) -> bool {
22142214
PartialEq::eq(&self[..], &other[..])
22152215
}
2216-
#[inline]
2217-
fn ne(&self, other: &String) -> bool {
2218-
PartialEq::ne(&self[..], &other[..])
2219-
}
22202216
}
22212217

22222218
macro_rules! impl_eq {

library/core/src/str/traits.rs

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ impl PartialEq for str {
2828
fn eq(&self, other: &str) -> bool {
2929
self.as_bytes() == other.as_bytes()
3030
}
31-
#[inline]
32-
fn ne(&self, other: &str) -> bool {
33-
!(*self).eq(other)
34-
}
3531
}
3632

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

0 commit comments

Comments
 (0)