Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: allow clippy unnecessary_cast for cross-platform statvfs fields
The statvfs struct fields (f_blocks, f_bavail, f_frsize) are u32 on
macOS but u64 on Linux. The casts are needed for portability but
trigger clippy::unnecessary_cast on Linux CI.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
  • Loading branch information
mattleaverton and claude committed Feb 12, 2026
commit cc3c4d826534721d3d5d01d3ef97e989ad2c78db
1 change: 1 addition & 0 deletions server/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ fn alpha(dt: f64, window_seconds: f64) -> f64 {
/// counts by f_bsize instead of f_frsize, which inflates values by 256x on
/// VirtioFS mounts (Docker Desktop) where f_bsize=1MiB but f_frsize=4KiB.
#[cfg(unix)]
#[allow(clippy::unnecessary_cast)] // statvfs fields are u32 on macOS, u64 on Linux
fn disk_space_for_path(path: &Path) -> (u64, u64) {
use std::ffi::CString;
use std::os::unix::ffi::OsStrExt;
Expand Down
Loading