We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c4389e commit 2fcee0eCopy full SHA for 2fcee0e
vortex-ffi/src/struct_fields.rs
@@ -61,16 +61,11 @@ pub unsafe extern "C-unwind" fn vx_struct_fields_field_dtype(
61
let ptr = unsafe { dtype.as_ref() }.vortex_expect("null ptr");
62
let struct_dtype = &ptr.0;
63
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() {
+ if idx >= struct_dtype.nfields() {
70
return ptr::null();
71
}
72
73
- match struct_dtype.field_by_index(idx_usize) {
+ match struct_dtype.field_by_index(idx) {
74
Some(field_dtype) => vx_dtype::new(Arc::new(field_dtype)),
75
None => ptr::null(),
76
0 commit comments