serde-rs / bytes

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

Implement PartialEq for Vec<u8> and &[u8]? #1

Closed sunshowers closed 5 years ago

sunshowers commented 7 years ago

That would be useful while writing tests, to compare a Vec<u8> or a bytestring literal to a Bytes or a ByteBuf without trying to wrap things up.

dtolnay commented 5 years ago

Thanks! Fixed in 82ecabf037dee323d4626c24d1251bd475bf5050 to support comparing with anything that implements AsRef\<[u8]> on the right-hand side. Released in 0.11.0.