*: 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

@ -252,7 +252,7 @@ impl Video {
}
#[inline]
pub fn plane_mut<T: Component>(&mut self, index: usize) -> &mut[T] {
pub fn plane_mut<T: Component>(&mut self, index: usize) -> &mut [T] {
if index >= self.planes() {
panic!("out of bounds");
}