Test content, not value
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
parent
0d1584507b
commit
4e51ef7ccd
@ -163,7 +163,7 @@ fn test_as_mut() {
|
||||
// Pointers to unsized types -- slices
|
||||
let s: &mut [u8] = &mut [1, 2, 3];
|
||||
let ms: *mut [u8] = s;
|
||||
assert_eq!(ms.as_mut().unwrap() as *mut _, s as *mut _);
|
||||
assert_eq!(ms.as_mut(), Some(&mut [1, 2, 3]));
|
||||
|
||||
let mz: *mut [u8] = &mut [];
|
||||
assert_eq!(mz.as_mut(), Some(&mut [][..]));
|
||||
|
Loading…
Reference in New Issue
Block a user