On 29-09-23, 12:58, Erik Schilling wrote: > I think staying with `&Info` keeps the API a lot simpler (and this code > simpler). Right. > > > > > We would still need to cast it the same way. One _could_ write: > > > > > > fn as_raw_ptr(&self) -> *mut gpiod::gpiod_line_info { > > > &self.info as *const _ as *mut _ > > > } > > > > Can we use deref to just do this magically for us in this file somehow ? > > Hm... Not exactly sure what you mean here. Do you mean a `Deref` > implementation? That one would leak this implementation detail into > public API. I was thinking of something else, not worth it. This is fine. -- viresh