Skip to content

Commit

Permalink
fix: assert sign in row-major views construction (whoops)
Browse files Browse the repository at this point in the history
  • Loading branch information
DCNick3 committed Jul 5, 2024
1 parent c595d26 commit e0646e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/nalgebra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ where
R: Dim,
C: Dim,
{
assert!(slice.len() <= rows.value() * cols.value());
assert!(slice.len() >= rows.value() * cols.value());
Matrix::from_data(unsafe {
ViewStorageMut::from_raw_parts(slice.as_mut_ptr(), (rows, cols), (cols, U1))
})
Expand All @@ -30,7 +30,7 @@ where
R: Dim,
C: Dim,
{
assert!(slice.len() <= rows.value() * cols.value());
assert!(slice.len() >= rows.value() * cols.value());
Matrix::from_data(unsafe {
ViewStorage::from_raw_parts(slice.as_ptr(), (rows, cols), (cols, U1))
})
Expand Down

0 comments on commit e0646e8

Please sign in to comment.