*: check unsafe slice creation
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user