fix slice comparison
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
parent
4e51ef7ccd
commit
90b95cf53f
@ -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(), Some(&mut [1, 2, 3]));
|
||||
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