Skip to content

Commit

Permalink
Test content, not value
Browse files Browse the repository at this point in the history
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
  • Loading branch information
RalfJung and matklad authored Aug 5, 2019
1 parent 0d15845 commit 4e51ef7
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().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 [][..]));
Expand Down

0 comments on commit 4e51ef7

Please sign in to comment.