forked from M-Labs/nalgebra
Fix unsound usize::get_unchecked_mut
This commit is contained in:
parent
8ea8ac70d5
commit
df51de0664
@ -589,7 +589,10 @@ where
|
||||
where
|
||||
S: RawStorageMut<T, R, C>,
|
||||
{
|
||||
matrix.data.get_unchecked_linear_mut(self)
|
||||
let nrows = matrix.shape().0;
|
||||
let row = self % nrows;
|
||||
let col = self / nrows;
|
||||
matrix.data.get_unchecked_mut(row, col)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user