Safely get data in matrix Debug formatting
This commit is contained in:
parent
2dd76fd86e
commit
699d57d9dd
@ -210,10 +210,7 @@ impl<T: fmt::Debug, R: Dim, C: Dim, S: RawStorage<T, R, C> + fmt::Debug> fmt::De
|
||||
if j != 0 {
|
||||
write!(f, ", ")?;
|
||||
}
|
||||
// Safety: the indices are within range
|
||||
unsafe {
|
||||
(*self.data.get_unchecked(i, j)).fmt(f)?;
|
||||
}
|
||||
self[(i, j)].fmt(f)?;
|
||||
}
|
||||
if i != nrows - 1 {
|
||||
write!(f, "; ")?;
|
||||
|
Loading…
Reference in New Issue
Block a user