summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/sys/test_socket.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs
index 3d04ac0a..f2ebfe69 100644
--- a/test/sys/test_socket.rs
+++ b/test/sys/test_socket.rs
@@ -30,7 +30,7 @@ pub fn test_path_to_sock_addr() {
let actual = Path::new("/foo/bar");
let addr = UnixAddr::new(actual).unwrap();
- let expect: &'static [i8] = unsafe { mem::transmute(b"/foo/bar".as_ref()) };
+ let expect: &'static [i8] = unsafe { mem::transmute(&b"/foo/bar"[..]) };
assert_eq!(&addr.0.sun_path[..8], expect);
assert_eq!(addr.path(), actual);