Skip to content

fix(hm): unbreak main — NonZeroU64 capacity in cache clean#137

Merged
markovejnovic merged 1 commit into
mainfrom
hotfix/clean-nonzero-capacity
Jun 10, 2026
Merged

fix(hm): unbreak main — NonZeroU64 capacity in cache clean#137
markovejnovic merged 1 commit into
mainfrom
hotfix/clean-nonzero-capacity

Conversation

@markovejnovic

Copy link
Copy Markdown
Contributor

Problem

main does not compile on stable (its own CI / build-hm / examples checks are red, and every open PR is red because GitHub builds PRs merged with main).

error[E0308]: mismatched types
  --> crates/hm/src/commands/cache/clean.rs:58:62
     expected `NonZero<u64>`, found `u64`

#117 changed ImageRegistry::open to take NonZeroU64, but the cache clean caller still passed u64::MAX. No textual conflict, so it merged silently and broke main.

Fix

u64::MAXstd::num::NonZeroU64::MAX (const; no expect, satisfies the crate's expect_used lint).

Verified (stable toolchain, fresh target)

  • cargo build -p harmont-cli
  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --locked -D warnings

Merging this unblocks #126, #128, #133, #50, #87, #127.

main was broken: #117 changed ImageRegistry::open to take NonZeroU64, but the
cache-clean caller still passed u64::MAX (E0308). It slipped in as a semantic
merge (no textual conflict), so main's hm binary stopped compiling on stable.
This unbreaks main; every open PR is red only because GitHub builds them merged
with this broken main.
@markovejnovic markovejnovic merged commit e78bf4a into main Jun 10, 2026
16 of 17 checks passed
@markovejnovic markovejnovic deleted the hotfix/clean-nonzero-capacity branch June 10, 2026 21:08
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.

1 participant