diff --git a/test/test_fcntl.rs b/test/test_fcntl.rs index 11dc42ca96..f61281b20c 100644 --- a/test/test_fcntl.rs +++ b/test/test_fcntl.rs @@ -4,6 +4,7 @@ use nix::fcntl::{openat, open, OFlag, readlink, readlinkat, rename, renameat}; use nix::sys::stat::Mode; use nix::unistd::{close, read}; use tempfile::{self, NamedTempFile}; +use std::fs::File; use std::io::prelude::*; use std::os::unix::fs; @@ -33,7 +34,7 @@ fn test_openat() { fn test_rename() { let old_dir = tempfile::tempdir().unwrap(); let old_path = old_dir.path().join("old"); - std::fs::File::create(&old_path).unwrap(); + File::create(&old_path).unwrap(); let new_dir = tempfile::tempdir().unwrap(); let new_path = new_dir.path().join("new"); rename(&old_path, &new_path).unwrap(); @@ -44,7 +45,7 @@ fn test_rename() { fn test_renameat() { let old_dir = tempfile::tempdir().unwrap(); let old_dirfd = open(old_dir.path(), OFlag::empty(), Mode::empty()).unwrap(); - std::fs::File::create(&old_dir.path().join("old")).unwrap(); + File::create(&old_dir.path().join("old")).unwrap(); let new_dir = tempfile::tempdir().unwrap(); let new_dirfd = open(new_dir.path(), OFlag::empty(), Mode::empty()).unwrap(); renameat(old_dirfd, "old", new_dirfd, "new").unwrap();