Skip to content

Commit 7e5d176

Browse files
committed
test: fix tests in 'test/test_fcntl.rs'
1 parent efca21c commit 7e5d176

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_fcntl.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ mod linux_android {
383383
let tmp = NamedTempFile::new().unwrap();
384384

385385
let fd = tmp.as_raw_fd();
386-
let statfs = nix::sys::statfs::fstatfs(&tmp).unwrap();
386+
let statfs = nix::sys::statfs::fstatfs(tmp.as_file()).unwrap();
387387
if statfs.filesystem_type() == nix::sys::statfs::OVERLAYFS_SUPER_MAGIC {
388388
// OverlayFS is a union file system. It returns one inode value in
389389
// stat(2), but a different one shows up in /proc/locks. So we must
@@ -421,7 +421,7 @@ mod linux_android {
421421
let tmp = NamedTempFile::new().unwrap();
422422

423423
let fd = tmp.as_raw_fd();
424-
let statfs = nix::sys::statfs::fstatfs(&tmp).unwrap();
424+
let statfs = nix::sys::statfs::fstatfs(tmp.as_file()).unwrap();
425425
if statfs.filesystem_type() == nix::sys::statfs::OVERLAYFS_SUPER_MAGIC {
426426
// OverlayFS is a union file system. It returns one inode value in
427427
// stat(2), but a different one shows up in /proc/locks. So we must

0 commit comments

Comments
 (0)