mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
refactor/rm ~ fix cargo clippy
warning (clippy::upper_case_acronyms)
This commit is contained in:
parent
3cfb956684
commit
1ef820212c
2 changed files with 3 additions and 3 deletions
|
@ -18,10 +18,12 @@ path = "src/rm.rs"
|
||||||
clap = "2.33"
|
clap = "2.33"
|
||||||
walkdir = "2.2"
|
walkdir = "2.2"
|
||||||
remove_dir_all = "0.5.1"
|
remove_dir_all = "0.5.1"
|
||||||
|
winapi = { version="0.3", features=[] }
|
||||||
|
|
||||||
uucore = { version=">=0.0.8", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { version=">=0.0.8", package="uucore", path="../../uucore", features=["fs"] }
|
||||||
uucore_procs = { version=">=0.0.5", package="uucore_procs", path="../../uucore_procs" }
|
uucore_procs = { version=">=0.0.5", package="uucore_procs", path="../../uucore_procs" }
|
||||||
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rm"
|
name = "rm"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -430,9 +430,7 @@ use std::os::windows::prelude::MetadataExt;
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn is_symlink_dir(metadata: &fs::Metadata) -> bool {
|
fn is_symlink_dir(metadata: &fs::Metadata) -> bool {
|
||||||
use std::os::raw::c_ulong;
|
use winapi::um::winnt::FILE_ATTRIBUTE_DIRECTORY;
|
||||||
pub type DWORD = c_ulong;
|
|
||||||
pub const FILE_ATTRIBUTE_DIRECTORY: DWORD = 0x10;
|
|
||||||
|
|
||||||
metadata.file_type().is_symlink()
|
metadata.file_type().is_symlink()
|
||||||
&& ((metadata.file_attributes() & FILE_ATTRIBUTE_DIRECTORY) != 0)
|
&& ((metadata.file_attributes() & FILE_ATTRIBUTE_DIRECTORY) != 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue