Huge overhaul of bytes

* Get rid of `ByteStr` trait
* `Bytes` is not a concrete type
* Add `BlockBuf`
* Delete lots of cruft
* Performance work
This commit is contained in:
Carl Lerche
2016-08-10 15:45:31 -07:00
parent b2efe63c70
commit 04e0ac75e2
31 changed files with 1630 additions and 1653 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ pub fn test_readijng_buf_from_reader() {
let mut buf = ByteBuf::mut_with_capacity(1024);
assert_eq!(3, reader.read_buf(&mut buf).unwrap());
assert_eq!(b"foo".to_bytes(), buf.flip().to_bytes());
assert_eq!(Bytes::from(&b"foo"), Bytes::from(buf.flip()));
}
fn chunks(chunks: Vec<&'static [u8]>) -> Chunked {