feat: remove impl IntoBuf for Cursor<Self>, impl Buf for Bytes, BytesMut, refactor iterators

This commit is contained in:
YetAnotherMinion
2019-06-06 16:59:44 -07:00
committed by Sean McArthur
parent 654a11c84c
commit d8134903de
12 changed files with 246 additions and 273 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
extern crate bytes;
use bytes::{Buf, IntoBuf, Bytes};
use bytes::{Bytes};
#[test]
fn iter_len() {
let buf = Bytes::from(&b"hello world"[..]).into_buf();
let buf = Bytes::from_static(b"hello world");
let iter = buf.iter();
assert_eq!(iter.size_hint(), (11, Some(11)));
@@ -14,7 +14,7 @@ fn iter_len() {
#[test]
fn empty_iter_len() {
let buf = Bytes::from(&b""[..]).into_buf();
let buf = Bytes::from_static(b"");
let iter = buf.iter();
assert_eq!(iter.size_hint(), (0, Some(0)));