Polish API surface

This commit is contained in:
Carl Lerche
2017-02-16 16:44:38 -08:00
parent bababa8797
commit 646624c130
6 changed files with 474 additions and 243 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ fn test_vec_as_mut_buf() {
assert!(buf.bytes_mut().len() >= 64);
}
buf.copy_from(&b"zomg"[..]);
buf.put(&b"zomg"[..]);
assert_eq!(&buf, b"zomg");
@@ -23,7 +23,7 @@ fn test_vec_as_mut_buf() {
assert_eq!(buf.capacity(), 64);
for _ in 0..16 {
buf.copy_from(&b"zomg"[..]);
buf.put(&b"zomg"[..]);
}
assert_eq!(buf.len(), 68);
@@ -32,7 +32,7 @@ fn test_vec_as_mut_buf() {
#[test]
fn test_put_u8() {
let mut buf = Vec::with_capacity(8);
buf.put_u8(33);
buf.put::<u8>(33);
assert_eq!(b"\x21", &buf[..]);
}