Skip to content

Commit 7589028

Browse files
committed
lint: fix clippy::needless_return and clippy::len_zero
1 parent b5115f5 commit 7589028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ffi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ mod enabled {
457457
}
458458

459459
match ptr.ty {
460-
FfiType::Void => return Err("Cannot read from a void pointer".to_string()),
460+
FfiType::Void => Err("Cannot read from a void pointer".to_string()),
461461
FfiType::Short => arr!(c_short),
462462
FfiType::Int => arr!(c_int),
463463
FfiType::Long => arr!(c_long),
@@ -638,7 +638,7 @@ mod enabled {
638638
};
639639
}
640640

641-
let is_scalar = value.shape.len() == 0;
641+
let is_scalar = value.shape.is_empty();
642642

643643
macro_rules! scalar {
644644
($arr:expr, $c_ty:ty) => {{

0 commit comments

Comments
 (0)