Skip to content

Commit

Permalink
Update library/core/src/str/pattern.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Celina G. Val <[email protected]>
  • Loading branch information
qinheping and celinval authored Nov 8, 2024
1 parent 44196af commit 452ab44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/str/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
&& crate::ub_checks::same_allocation(y.as_ptr(), py)
&& px.addr() >= x.addr()
&& py.addr() >= y.addr()
&& px as isize - x.as_ptr() as isize == (py as isize - y.as_ptr() as isize))]
&& px.addr() - x.addr() == py.addr() - y.addr())]
while px < pxend {
let vx = (px as *const u32).read_unaligned();
let vy = (py as *const u32).read_unaligned();
Expand Down

0 comments on commit 452ab44

Please sign in to comment.