summaryrefslogtreecommitdiff
path: root/src/dir.rs
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2022-10-08 13:48:59 -0500
committerRyan Zoeller <rtzoeller@rtzoeller.com>2022-10-08 14:08:54 -0500
commit6e7bddd1540565a9da7f7e56ddf5851d1786a3dd (patch)
tree567db2ef31477eb0b6fa91e764e6bb780e672276 /src/dir.rs
parente5913c68a75474844b79663571086796ef932ba9 (diff)
downloadnix-6e7bddd1540565a9da7f7e56ddf5851d1786a3dd.zip
Fix clippy warnings on nightly
Clippy is now smarter about detecting unnecessary casts and useless conversions, which means we need to be more explicit about when the conversions are needed for a subset of platforms. Required changes found by repeatedly running the following command against a list of the supported platforms. `xargs -t -I {} sh -c "cargo clippy -Zbuild-std --target {} --all-targets -- -D warnings || exit 255"` I removed the casts it complained about, and then restored them with an `#[allow]` if a later target needed the cast.
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dir.rs b/src/dir.rs
index cbcd1ea7..e36a8aa6 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -208,6 +208,8 @@ pub enum Type {
impl Entry {
/// Returns the inode number (`d_ino`) of the underlying `dirent`.
#[allow(clippy::useless_conversion)] // Not useless on all OSes
+ // The cast is not unnecessary on all platforms.
+ #[allow(clippy::unnecessary_cast)]
pub fn ino(&self) -> u64 {
cfg_if! {
if #[cfg(any(target_os = "android",