Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jturner314 committed Sep 14, 2024
1 parent 8b5ac4c commit d5a578e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/npy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,11 @@ pub trait ViewMutElement: Sized {
/// overflow `isize`.
fn shape_length_checked<T>(shape: &IxDyn) -> Option<usize> {
let len = shape.size_checked()?;
if len > std::isize::MAX as usize {
if len > isize::MAX as usize {
return None;
}
let bytes = len.checked_mul(mem::size_of::<T>())?;
if bytes > std::isize::MAX as usize {
if bytes > isize::MAX as usize {
return None;
}
Some(len)
Expand Down

0 comments on commit d5a578e

Please sign in to comment.