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 {
|
if j != 0 {
|
||||||
write!(f, ", ")?;
|
write!(f, ", ")?;
|
||||||
}
|
}
|
||||||
// Safety: the indices are within range
|
self[(i, j)].fmt(f)?;
|
||||||
unsafe {
|
|
||||||
(*self.data.get_unchecked(i, j)).fmt(f)?;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if i != nrows - 1 {
|
if i != nrows - 1 {
|
||||||
write!(f, "; ")?;
|
write!(f, "; ")?;
|
||||||
|
Loading…
Reference in New Issue
Block a user