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
+3 -3
View File
@@ -6,7 +6,7 @@ pub fn test_slice_round_trip() {
let mut dst = vec![];
let src = gen_bytes(2000);
let s = Bytes::from(&src);
let s = Bytes::from(src.clone());
assert_eq!(2000, s.len());
s.buf().copy_to(&mut dst);
@@ -17,7 +17,7 @@ pub fn test_slice_round_trip() {
pub fn test_index() {
let src = gen_bytes(2000);
let s = Bytes::from(&src);
let s = Bytes::from(src.clone());
for i in 0..2000 {
assert_eq!(src[i], s[i]);
@@ -27,6 +27,6 @@ pub fn test_index() {
#[test]
#[should_panic]
pub fn test_index_out_of_range() {
let s = Bytes::from(&gen_bytes(2000));
let s = Bytes::from(gen_bytes(2000));
let _ = s[2001];
}