Rename & refactor ByteBuf -> SliceBuf

This commit is contained in:
Carl Lerche
2016-09-25 22:40:35 -07:00
parent c16ad2bc9d
commit b1dc10e907
19 changed files with 333 additions and 333 deletions
+2 -2
View File
@@ -5,10 +5,10 @@ use std::io;
#[test]
pub fn test_readijng_buf_from_reader() {
let mut reader = chunks(vec![b"foo", b"bar", b"baz"]);
let mut buf = MutByteBuf::with_capacity(1024);
let mut buf = AppendBuf::with_capacity(1024);
assert_eq!(3, reader.read_buf(&mut buf).unwrap());
assert_eq!(Bytes::from(&b"foo"), Bytes::from(buf.flip()));
assert_eq!(Bytes::from_slice(&b"foo"), Bytes::from(buf));
}
fn chunks(chunks: Vec<&'static [u8]>) -> Chunked {