*: check unsafe slice creation

This commit is contained in:
Euan Rochester
2016-05-01 00:11:39 +01:00
committed by meh
parent ca907c57f3
commit fafcf1d433
4 changed files with 11 additions and 10 deletions

View File

@ -177,7 +177,8 @@ impl Index<usize> for Buffer {
}
unsafe {
slice::from_raw_parts(*self.buffer.offset(index as isize), self.size as usize)
slice::from_raw_parts(*self.buffer.offset(index as isize),
self.size as usize)
}
}
}