serde-rs / bytes

Wrapper types to enable optimized handling of &[u8] and Vec<u8>
Apache License 2.0
317 stars 37 forks source link

More obvious conversion methods #3

Closed dtolnay closed 5 years ago

dtolnay commented 7 years ago

Some of the conversions are hard to discover from rustdoc.

let v: Vec<u8> = bytebuf.into();

This would be more discoverable as:

let v = bytebuf.into_vec();
dtolnay commented 5 years ago

Fixed in f810459d2af103184767050e6181846ed9e12138 / d0848e81cde17688e6f3f351d30a1fd95bcf65c9.