Skip to content

Commit c956d1b

Browse files
committed
Avoid another "unused import" warning on Windows
There were two places in #1764 where I had an unconditional import that causes a warning on Windows about how it is unused. 4d5e656 fixed one. This fixes the other: warning: unused import: `Permissions` --> gix-worktree-state\src\checkout\entry.rs:3:23 | 3 | fs::{OpenOptions, Permissions}, | ^^^^^^^^^^^
1 parent af8f201 commit c956d1b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: gix-worktree-state/src/checkout/entry.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::{
22
borrow::Cow,
3-
fs::{OpenOptions, Permissions},
43
io::Write,
54
path::{Path, PathBuf},
65
};
@@ -237,7 +236,7 @@ fn debug_assert_dest_is_no_symlink(path: &Path) {
237236
}
238237
}
239238

240-
fn open_options(path: &Path, destination_is_initially_empty: bool, overwrite_existing: bool) -> OpenOptions {
239+
fn open_options(path: &Path, destination_is_initially_empty: bool, overwrite_existing: bool) -> std::fs::OpenOptions {
241240
if overwrite_existing || !destination_is_initially_empty {
242241
debug_assert_dest_is_no_symlink(path);
243242
}
@@ -299,7 +298,7 @@ pub(crate) fn finalize_entry(
299298
}
300299

301300
#[cfg(unix)]
302-
fn set_mode_executable(mut perm: Permissions) -> Option<Permissions> {
301+
fn set_mode_executable(mut perm: std::fs::Permissions) -> Option<std::fs::Permissions> {
303302
use std::os::unix::fs::PermissionsExt;
304303
let mut mode = perm.mode();
305304
if mode & 0o170000 != 0o100000 {

0 commit comments

Comments
 (0)