Tweak Sink / Source

This commit is contained in:
Carl Lerche
2016-10-07 15:37:12 -07:00
parent 6f97d04077
commit a4bfc63de7
4 changed files with 26 additions and 43 deletions
+2
View File
@@ -38,12 +38,14 @@ pub fn test_rope_slice() {
let left = bytes.slice_to(250);
assert_eq!(250, left.len());
dst.clear();
left.buf().copy_to(&mut dst);
assert_eq!(dst, &TEST_BYTES_1[..250]);
let right = bytes.slice_from(250);
assert_eq!(TEST_BYTES_1.len() - 250, right.len());
dst.clear();
right.buf().copy_to(&mut dst);
// assert_eq!(dst, &TEST_BYTES_1[250..]);
}