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
+1 -1
View File
@@ -54,6 +54,6 @@ fn test_vec_sink_capacity() {
sink.reserve(16);
assert!(sink.capacity() >= 16, "Capacity {} must be at least 16", sink.capacity());
let mut source = Cursor::new(b"0123456789abcdef0123456789abcdef");
sink.copy_from(&mut source);
sink.sink(&mut source);
assert!(sink.len() <= sink.capacity(), "Length {} must be less than or equal to capacity {}", sink.len(), sink.capacity());
}