Skip to content

Commit

Permalink
fix slice comparison
Browse files Browse the repository at this point in the history
Co-Authored-By: Aleksey Kladov <[email protected]>
  • Loading branch information
RalfJung and matklad authored Aug 5, 2019
1 parent 4e51ef7 commit 90b95cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/tests/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 [][..]));
Expand Down

0 comments on commit 90b95cf

Please sign in to comment.