1
Fork 0

Rename unsigned_offset_from to sub_ptr

This commit is contained in:
Scott McMurray 2022-04-09 14:14:35 -07:00
parent 89a18cb600
commit e76b3f3b5b
11 changed files with 46 additions and 22 deletions

View file

@ -1056,7 +1056,7 @@ where
fn drop(&mut self) {
// `T` is not a zero-sized type, and these are pointers into a slice's elements.
unsafe {
let len = self.end.unsigned_offset_from(self.start);
let len = self.end.sub_ptr(self.start);
ptr::copy_nonoverlapping(self.start, self.dest, len);
}
}