From d5e34343718c9b69f25716cc2f315b4436be072d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Tue, 9 Jan 2024 05:22:36 +0100 Subject: [PATCH] Also allow unnecessary_fallible_conversions lint (#6294) This fixes the clippy lint firing on macOS on the conversion which needed for portability. For some reason, the logic in https://github.com/rust-lang/rust-clippy/pull/11669 to avoid an overlap is not working. --- pageserver/src/statvfs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pageserver/src/statvfs.rs b/pageserver/src/statvfs.rs index 08b5264290..45a516566f 100644 --- a/pageserver/src/statvfs.rs +++ b/pageserver/src/statvfs.rs @@ -23,7 +23,7 @@ impl Statvfs { } // NB: allow() because the block count type is u32 on macOS. - #[allow(clippy::useless_conversion)] + #[allow(clippy::useless_conversion, clippy::unnecessary_fallible_conversions)] pub fn blocks(&self) -> u64 { match self { Statvfs::Real(stat) => u64::try_from(stat.blocks()).unwrap(), @@ -32,7 +32,7 @@ impl Statvfs { } // NB: allow() because the block count type is u32 on macOS. - #[allow(clippy::useless_conversion)] + #[allow(clippy::useless_conversion, clippy::unnecessary_fallible_conversions)] pub fn blocks_available(&self) -> u64 { match self { Statvfs::Real(stat) => u64::try_from(stat.blocks_available()).unwrap(),