fix slice comparison

Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
Ralf Jung 2019-08-05 15:30:08 +02:00 committed by GitHub
parent 4e51ef7ccd
commit 90b95cf53f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 [][..]));