Skip to content

Let just clippy pass on macOS - #43

Merged
tobi merged 1 commit into
tobi:mainfrom
0bserver07:fix/clippy-clean-on-macos
Sep 11, 2026
Merged

tobi merged 1 commit into
tobi:mainfrom
0bserver07:fix/clippy-clean-on-macos

Conversation

@0bserver07

Copy link
Copy Markdown
Contributor

just clippy fails on a Mac while CI on Linux is green: the two statvfs helpers, disk_usage in crates/walgit-wal/src/registry.rs and disk_avail in crates/walgit-server/src/rebuild.rs, widen the block-count fields with as u64, and those fields are u32 on macOS and u64 on Linux. The strict set flags cast_lossless here and would flag useless_conversion there if the cast became u64::from, so no spelling satisfies both. Each helper gets a targeted #[allow(clippy::cast_lossless)] with a comment saying why, the shape the lint notes in Cargo.toml ask for. Six lines, no behaviour change, a no-op on Linux.

Checked with cargo clippy --workspace --all-targets -- -D warnings on macOS, now clean. Part of what #11 asks for: a contributor's laptop and CI agreeing on the gates #15 added.

The two statvfs helpers, disk_usage in walgit-wal/src/registry.rs and
disk_avail in walgit-server/src/rebuild.rs, widen the block-count fields with
`as u64`. Those fields are u32 on macOS and u64 on Linux, so on a Mac the
strict set fails with cast_lossless and the gate tobi#15 added never passes
locally, while `u64::from` would be a useless conversion on Linux where CI
runs. No spelling satisfies both platforms, so each helper carries a targeted
allow with a comment saying why, the shape the Cargo.toml lint notes ask for.
Checked with cargo clippy --workspace --all-targets -- -D warnings on macOS,
now clean; the change is a no-op on Linux.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CSbhRh6UEjFrgBYYzucvDe
@tobi
tobi merged commit 0c8d4b6 into tobi:main Sep 11, 2026
1 of 2 checks passed
@0bserver07
0bserver07 deleted the fix/clippy-clean-on-macos branch September 11, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants