Closed hinto-janai closed 1 year ago
This adds some functions that exposes the inner data.
Since the inner Cow is Cow::Owned, into_owned() should be a cheap no-clone/no-allocation call.
Cow
Cow::Owned
into_owned()
Also, most libraries seem use bytes() or as_bytes() instead of data() but that'll break everyone's code, so, maybe not worth it.
bytes()
as_bytes()
data()
Ah, I see.
Requested changes were made.
Thanks!
This adds some functions that exposes the inner data.
Since the inner
Cow
isCow::Owned
,into_owned()
should be a cheap no-clone/no-allocation call.Also, most libraries seem use
bytes()
oras_bytes()
instead ofdata()
but that'll break everyone's code, so, maybe not worth it.