diff --git a/gio/src/socket.rs b/gio/src/socket.rs index 391c25c9de3f..dc55002d2d13 100644 --- a/gio/src/socket.rs +++ b/gio/src/socket.rs @@ -925,12 +925,7 @@ mod tests { let mut fds = [0 as libc::c_int; 2]; let (out_sock, in_sock) = unsafe { - let ret = libc::socketpair( - libc::AF_UNIX, - libc::SOCK_STREAM | libc::SOCK_CLOEXEC, - 0, - fds.as_mut_ptr(), - ); + let ret = libc::socketpair(libc::AF_UNIX, libc::SOCK_STREAM, 0, fds.as_mut_ptr()); if ret != 0 { panic!("{}", io::Error::last_os_error()); } diff --git a/glib/src/translate.rs b/glib/src/translate.rs index bceccc25c1a4..760be8115a59 100644 --- a/glib/src/translate.rs +++ b/glib/src/translate.rs @@ -2812,10 +2812,10 @@ mod tests { // gives us useful results let dir_1 = tmp_dir.join("abcd"); fs::create_dir(&dir_1).unwrap(); - assert_eq!(crate::path_get_basename(&dir_1), Path::from("abcd")); + assert_eq!(crate::path_get_basename(&dir_1), Path::new("abcd")); assert_eq!( crate::path_get_basename(dir_1.canonicalize().unwrap()), - Path::from("abcd") + Path::new("abcd") ); assert_eq!( crate::path_get_dirname(dir_1.canonicalize().unwrap()),