Skip to content

Commit

Permalink
Also allow unnecessary_fallible_conversions lint (#6294)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
arpad-m authored Jan 9, 2024
1 parent 66c52a6 commit d5e3434
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pageserver/src/statvfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down

1 comment on commit d5e3434

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2306 tests run: 2217 passed, 0 failed, 89 skipped (full report)


Flaky tests (2)

Postgres 16

Postgres 15

  • test_crafted_wal_end[last_wal_record_crossing_segment]: release

Code coverage (full report)

  • functions: 54.7% (10139 of 18520 functions)
  • lines: 81.5% (58107 of 71261 lines)

The comment gets automatically updated with the latest test results
d5e3434 at 2024-01-09T05:01:32.701Z :recycle:

Please sign in to comment.