aboutsummaryrefslogtreecommitdiff
path: root/tests/test_bytes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_bytes.rs')
-rw-r--r--tests/test_bytes.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/test_bytes.rs b/tests/test_bytes.rs
index 4cf340e..e188354 100644
--- a/tests/test_bytes.rs
+++ b/tests/test_bytes.rs
@@ -258,15 +258,10 @@ fn split_to_oob_mut() {
}
#[test]
+#[should_panic]
fn split_to_uninitialized() {
let mut bytes = BytesMut::with_capacity(1024);
- let other = bytes.split_to(128);
-
- assert_eq!(bytes.len(), 0);
- assert_eq!(bytes.capacity(), 896);
-
- assert_eq!(other.len(), 0);
- assert_eq!(other.capacity(), 128);
+ let _other = bytes.split_to(128);
}
#[test]