Skip to content

Commit 4e51ef7

Browse files
RalfJungmatklad
andauthored
Test content, not value
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
1 parent 0d15845 commit 4e51ef7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/libcore/tests/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ fn test_as_mut() {
163163
// Pointers to unsized types -- slices
164164
let s: &mut [u8] = &mut [1, 2, 3];
165165
let ms: *mut [u8] = s;
166-
assert_eq!(ms.as_mut().unwrap() as *mut _, s as *mut _);
166+
assert_eq!(ms.as_mut(), Some(&mut [1, 2, 3]));
167167

168168
let mz: *mut [u8] = &mut [];
169169
assert_eq!(mz.as_mut(), Some(&mut [][..]));

0 commit comments

Comments
 (0)