From 1ef820212c8db78b3e11cefd6e1bac3e24103bae Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Mon, 31 May 2021 16:17:54 -0500 Subject: [PATCH] refactor/rm ~ fix `cargo clippy` warning (clippy::upper_case_acronyms) --- src/uu/rm/Cargo.toml | 2 ++ src/uu/rm/src/rm.rs | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uu/rm/Cargo.toml b/src/uu/rm/Cargo.toml index 9974111aa..d84756fd3 100644 --- a/src/uu/rm/Cargo.toml +++ b/src/uu/rm/Cargo.toml @@ -18,10 +18,12 @@ path = "src/rm.rs" clap = "2.33" walkdir = "2.2" remove_dir_all = "0.5.1" +winapi = { version="0.3", features=[] } uucore = { version=">=0.0.8", package="uucore", path="../../uucore", features=["fs"] } uucore_procs = { version=">=0.0.5", package="uucore_procs", path="../../uucore_procs" } + [[bin]] name = "rm" path = "src/main.rs" diff --git a/src/uu/rm/src/rm.rs b/src/uu/rm/src/rm.rs index ba764034a..ea56ca170 100644 --- a/src/uu/rm/src/rm.rs +++ b/src/uu/rm/src/rm.rs @@ -430,9 +430,7 @@ use std::os::windows::prelude::MetadataExt; #[cfg(windows)] fn is_symlink_dir(metadata: &fs::Metadata) -> bool { - use std::os::raw::c_ulong; - pub type DWORD = c_ulong; - pub const FILE_ATTRIBUTE_DIRECTORY: DWORD = 0x10; + use winapi::um::winnt::FILE_ATTRIBUTE_DIRECTORY; metadata.file_type().is_symlink() && ((metadata.file_attributes() & FILE_ATTRIBUTE_DIRECTORY) != 0)