override put_slice for &mut [u8] (#483)

This commit is contained in:
Zettroke
2021-02-15 16:35:01 -08:00
committed by GitHub
parent e4182808df
commit 268f6f80b4
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -70,6 +70,9 @@ fn test_mut_slice() {
let mut v = vec![0, 0, 0, 0];
let mut s = &mut v[..];
s.put_u32(42);
assert_eq!(s.len(), 0);
assert_eq!(&v, &[0, 0, 0, 42]);
}
#[test]