Fix a typo in swap_nonoverlapping_bytes

This commit is contained in:
Motoki Ikeda 2021-03-13 00:51:26 +09:00
parent 1381dcfdc5
commit 71a784d763

View file

@ -512,7 +512,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
let t = t.as_mut_ptr() as *mut u8;
// SAFETY: As `i < len`, and as the caller must guarantee that `x` and `y` are valid
// for `len` bytes, `x + i` and `y + i` must be valid adresses, which fulfills the
// for `len` bytes, `x + i` and `y + i` must be valid addresses, which fulfills the
// safety contract for `add`.
//
// Also, the caller must guarantee that `x` and `y` are valid for writes, properly aligned,