Re: [PATCH v4 06/11] rust: xarray: add `find_next` and `find_next_mut`

From: Daniel Almeida

Date: Wed Aug 26 2026 - 21:17:00 EST


Hi Andreas,

I wonder if we can't hoist most of these calls accessing self.state.state to
the XArrayState directly? For example, I see this in a couple of places:

+ bindings::xas_result(
+ &mut self.state.state,
+ bindings::xa_zero_to_null(bindings::xas_store(
+ &mut self.state.state,
+ core::ptr::null_mut(),
+ )),
+ )


How about XArrayState::replace(new: *mut c_void) -> *mut c_void?

Also:

+ state.state.xa_node = bindings::XAS_RESTART as *mut bindings::xa_node;
+ state.state.xa_index = 0;

Could be e.g.: "restart_at(index)”.


WDYT?

— Daniel