Skip to content

Commit d5e3434

Browse files
authored
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 rust-lang/rust-clippy#11669 to avoid an overlap is not working.
1 parent 66c52a6 commit d5e3434

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pageserver/src/statvfs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Statvfs {
2323
}
2424

2525
// NB: allow() because the block count type is u32 on macOS.
26-
#[allow(clippy::useless_conversion)]
26+
#[allow(clippy::useless_conversion, clippy::unnecessary_fallible_conversions)]
2727
pub fn blocks(&self) -> u64 {
2828
match self {
2929
Statvfs::Real(stat) => u64::try_from(stat.blocks()).unwrap(),
@@ -32,7 +32,7 @@ impl Statvfs {
3232
}
3333

3434
// NB: allow() because the block count type is u32 on macOS.
35-
#[allow(clippy::useless_conversion)]
35+
#[allow(clippy::useless_conversion, clippy::unnecessary_fallible_conversions)]
3636
pub fn blocks_available(&self) -> u64 {
3737
match self {
3838
Statvfs::Real(stat) => u64::try_from(stat.blocks_available()).unwrap(),

0 commit comments

Comments
 (0)