From 4e51ef7ccd9729b1f9074a44ef49778a3c53c3d4 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 5 Aug 2019 11:21:15 +0200 Subject: [PATCH] Test content, not value Co-Authored-By: Aleksey Kladov --- src/libcore/tests/ptr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/tests/ptr.rs b/src/libcore/tests/ptr.rs index df5f4faa60e..d5a079da989 100644 --- a/src/libcore/tests/ptr.rs +++ b/src/libcore/tests/ptr.rs @@ -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 [][..]));