fix impl IndexMut<RangeFull> for MatBuf to only provide up to ..rows

This commit is contained in:
tali 2023-04-11 12:28:45 -04:00
parent 586d328718
commit 89f64aa8d8
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ impl<const LEN: usize> core::ops::IndexMut<Range<i16>> for MatBuf<LEN> {
impl<const LEN: usize> core::ops::IndexMut<RangeFull> for MatBuf<LEN> {
fn index_mut(&mut self, _: RangeFull) -> &mut [u16] {
&mut self.buf
&mut self.buf[..self.rows as usize]
}
}