Closed jch-13 closed 7 months ago
Good catch, thanks!
Perhaps access to the field should never include the trailing NUL. The AsRef
implementation includes the entire raw field in the case a user wants to use it with, e.g., std::ffi::CStr
, but noodles neither guarantees there to be a trailing NUL nor has other parts of the API supporting this usage.
I noticed that the
From
conversion from abam::record::Name
to asam::alignment::record_buf::Name
includes the trailing NUL byte (I believeas_ref()
might be accidentally called instead ofas_bytes()
here).Thank you so much for noodles! :)