diff options
author | 2021-08-07 08:22:18 +0200 | |
---|---|---|
committer | 2021-08-07 08:22:18 +0200 | |
commit | ab8e3c01a8fae128971cea43eca18da03482cb29 (patch) | |
tree | b2a219b30113f9b6d0e00148069d48972fe972f3 /tests | |
parent | f34dc5c3f9e6a3a11e315631055194a733ac1d08 (diff) | |
download | bytes-ab8e3c01a8fae128971cea43eca18da03482cb29.tar.gz bytes-ab8e3c01a8fae128971cea43eca18da03482cb29.tar.zst bytes-ab8e3c01a8fae128971cea43eca18da03482cb29.zip |
Clarify BufMut allocation guarantees (#501)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_buf_mut.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_buf_mut.rs b/tests/test_buf_mut.rs index b85ab9c..f631982 100644 --- a/tests/test_buf_mut.rs +++ b/tests/test_buf_mut.rs @@ -9,7 +9,7 @@ use core::usize; fn test_vec_as_mut_buf() { let mut buf = Vec::with_capacity(64); - assert_eq!(buf.remaining_mut(), usize::MAX); + assert_eq!(buf.remaining_mut(), isize::MAX as usize); assert!(buf.chunk_mut().len() >= 64); @@ -17,7 +17,7 @@ fn test_vec_as_mut_buf() { assert_eq!(&buf, b"zomg"); - assert_eq!(buf.remaining_mut(), usize::MAX - 4); + assert_eq!(buf.remaining_mut(), isize::MAX as usize - 4); assert_eq!(buf.capacity(), 64); for _ in 0..16 { |