1
Fork 0

Replace usages of ptr::offset with ptr::{add,sub}.

This commit is contained in:
Corey Farwell 2018-08-19 22:16:22 -04:00
parent 6bf6d50a6f
commit 993fb93464
29 changed files with 148 additions and 148 deletions

View file

@ -245,7 +245,7 @@ mod tests {
.unwrap_or_else(|_| handle_alloc_error(layout));
let mut i = ptr.cast::<u8>().as_ptr();
let end = i.offset(layout.size() as isize);
let end = i.add(layout.size());
while i < end {
assert_eq!(*i, 0);
i = i.offset(1);