Skip to content

Commit 2fcee0e

Browse files
committed
fix clippy
Signed-off-by: Andrew Duffy <[email protected]>
1 parent 2c4389e commit 2fcee0e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

vortex-ffi/src/struct_fields.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,11 @@ pub unsafe extern "C-unwind" fn vx_struct_fields_field_dtype(
6161
let ptr = unsafe { dtype.as_ref() }.vortex_expect("null ptr");
6262
let struct_dtype = &ptr.0;
6363

64-
let idx_usize = match usize::try_from(idx) {
65-
Ok(i) => i,
66-
Err(_) => return ptr::null(),
67-
};
68-
69-
if idx_usize >= struct_dtype.nfields() {
64+
if idx >= struct_dtype.nfields() {
7065
return ptr::null();
7166
}
7267

73-
match struct_dtype.field_by_index(idx_usize) {
68+
match struct_dtype.field_by_index(idx) {
7469
Some(field_dtype) => vx_dtype::new(Arc::new(field_dtype)),
7570
None => ptr::null(),
7671
}

0 commit comments

Comments
 (0)