Skip to content

Commit

Permalink
Port from winapi to windows-sys.
Browse files Browse the repository at this point in the history
walkdir just uses the Windows bindings for one thing, and the change is
straightforward.

This accompanies BurntSushi/winapi-util#13.
  • Loading branch information
sunfishcode committed Jun 17, 2022
1 parent abf3a15 commit 4ad1177
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ members = ["walkdir-list"]
[dependencies]
same-file = "1.0.1"

[target.'cfg(windows)'.dependencies.winapi]
version = "0.3"
features = ["std", "winnt"]
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.36.0"
features = [
"Win32_Storage_FileSystem",
]

[target.'cfg(windows)'.dependencies.winapi-util]
version = "0.1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/dent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl DirEntry {
#[cfg(windows)]
pub(crate) fn is_dir(&self) -> bool {
use std::os::windows::fs::MetadataExt;
use winapi::um::winnt::FILE_ATTRIBUTE_DIRECTORY;
use windows_sys::Win32::Storage::FileSystem::FILE_ATTRIBUTE_DIRECTORY;
self.metadata.file_attributes() & FILE_ATTRIBUTE_DIRECTORY != 0
}

Expand Down

0 comments on commit 4ad1177

Please sign in to comment.