We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30b27f3 commit d482589Copy full SHA for d482589
src/libcore/slice/mod.rs
@@ -5294,13 +5294,7 @@ impl<A, B> SlicePartialEq<B> for [A]
5294
return false;
5295
}
5296
5297
- for i in 0..self.len() {
5298
- if !self[i].eq(&other[i]) {
5299
- return false;
5300
- }
5301
5302
-
5303
- true
+ self.iter().zip(other.iter()).all(|(x, y)| x == y)
5304
5305
5306
@@ -5317,13 +5311,7 @@ impl<A> SlicePartialEq<A> for [A]
5317
5311
return true;
5318
5312
5319
5313
5320
5321
5322
5323
5324
5325
5326
5314
5327
5315
5328
5316
5329
0 commit comments