On 29-09-23, 15:18, Erik Schilling wrote: > diff --git a/bindings/rust/libgpiod/src/chip.rs b/bindings/rust/libgpiod/src/chip.rs > index 81e1be6..9ef8f22 100644 > --- a/bindings/rust/libgpiod/src/chip.rs > +++ b/bindings/rust/libgpiod/src/chip.rs > @@ -107,7 +107,9 @@ impl Chip { > )); > } > > - line::Info::new(info) > + // SAFETY: We verified that the pointer is valid. We own the pointer and > + // no longer use it after converting it into a Info instance. > + Ok(unsafe { line::Info::from_raw_owned(info) }) Hmm, I was expecting the naming to be simplified in this version here. Now: Info::from_raw_owned() InfoRef::from_raw_non_owning() What I am suggesting: Info::from_raw() InfoRef::from_raw() Or maybe just `new()` routines for both ? I think structure names tell us enough about ownership here and we don't need to add it to functions. -- viresh