Skip to content

Commit fe36c54

Browse files
committed
clippy fix: remove manual PartialEq::ne
1 parent f51c987 commit fe36c54

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

library/core/src/cmp.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,8 +1817,6 @@ mod impls {
18171817
impl const PartialEq for $t {
18181818
#[inline]
18191819
fn eq(&self, other: &Self) -> bool { *self == *other }
1820-
#[inline]
1821-
fn ne(&self, other: &Self) -> bool { *self != *other }
18221820
}
18231821
)*)
18241822
}
@@ -1829,10 +1827,6 @@ mod impls {
18291827
fn eq(&self, _other: &()) -> bool {
18301828
true
18311829
}
1832-
#[inline]
1833-
fn ne(&self, _other: &()) -> bool {
1834-
false
1835-
}
18361830
}
18371831

18381832
partial_eq_impl! {
@@ -2030,10 +2024,6 @@ mod impls {
20302024
fn eq(&self, other: &&B) -> bool {
20312025
PartialEq::eq(*self, *other)
20322026
}
2033-
#[inline]
2034-
fn ne(&self, other: &&B) -> bool {
2035-
PartialEq::ne(*self, *other)
2036-
}
20372027
}
20382028
#[stable(feature = "rust1", since = "1.0.0")]
20392029
impl<A: PointeeSized, B: PointeeSized> PartialOrd<&B> for &A
@@ -2102,10 +2092,6 @@ mod impls {
21022092
fn eq(&self, other: &&mut B) -> bool {
21032093
PartialEq::eq(*self, *other)
21042094
}
2105-
#[inline]
2106-
fn ne(&self, other: &&mut B) -> bool {
2107-
PartialEq::ne(*self, *other)
2108-
}
21092095
}
21102096
#[stable(feature = "rust1", since = "1.0.0")]
21112097
impl<A: PointeeSized, B: PointeeSized> PartialOrd<&mut B> for &mut A
@@ -2172,10 +2158,6 @@ mod impls {
21722158
fn eq(&self, other: &&mut B) -> bool {
21732159
PartialEq::eq(*self, *other)
21742160
}
2175-
#[inline]
2176-
fn ne(&self, other: &&mut B) -> bool {
2177-
PartialEq::ne(*self, *other)
2178-
}
21792161
}
21802162

21812163
#[stable(feature = "rust1", since = "1.0.0")]
@@ -2188,9 +2170,5 @@ mod impls {
21882170
fn eq(&self, other: &&B) -> bool {
21892171
PartialEq::eq(*self, *other)
21902172
}
2191-
#[inline]
2192-
fn ne(&self, other: &&B) -> bool {
2193-
PartialEq::ne(*self, *other)
2194-
}
21952173
}
21962174
}

library/core/src/num/nonzero.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,6 @@ where
199199
fn eq(&self, other: &Self) -> bool {
200200
self.get() == other.get()
201201
}
202-
203-
#[inline]
204-
fn ne(&self, other: &Self) -> bool {
205-
self.get() != other.get()
206-
}
207202
}
208203

209204
#[unstable(feature = "structural_match", issue = "31434")]

0 commit comments

Comments
 (0)