Skip to content

Commit bcd3c1f

Browse files
committed
Remove ptr comparison check before doing memcmp
1 parent bd0bacc commit bcd3c1f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Diff for: src/libcore/slice/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -5859,9 +5859,6 @@ where
58595859
if self.len() != other.len() {
58605860
return false;
58615861
}
5862-
if self.as_ptr() == other.as_ptr() {
5863-
return true;
5864-
}
58655862
unsafe {
58665863
let size = mem::size_of_val(self);
58675864
memcmp(self.as_ptr() as *const u8, other.as_ptr() as *const u8, size) == 0

0 commit comments

Comments
 (0)