Skip to content

Rewrite eviction module#14

Open
brayniac wants to merge 1 commit intopelikan-io:mainfrom
brayniac:brayniac/rewrite-eviction
Open

Rewrite eviction module#14
brayniac wants to merge 1 commit intopelikan-io:mainfrom
brayniac:brayniac/rewrite-eviction

Conversation

@brayniac
Copy link
Copy Markdown
Contributor

Summary

  • Rewrite eviction/mod.rs and eviction/policy.rs
  • Policy doc comments now explain why each strategy works, not just what it does
  • rerank() uses a function pointer dispatch instead of duplicating match arms
  • Comparators use Ord/.cmp() instead of manual if-chains
  • ghost.rs unchanged (already clean)

Test plan

  • cargo test --workspace — 88 tests pass
  • cargo test -p segcache --features debug — 55 tests pass
  • cargo clippy --workspace --all-features --all-targets -- -D warnings — clean
  • cargo fmt --all --check — clean

🤖 Generated with Claude Code

@brayniac brayniac force-pushed the brayniac/rewrite-eviction branch 2 times, most recently from 244f80b to a7e51a4 Compare April 19, 2026 06:22
Rewrite Policy enum and Eviction struct. Policy doc comments now
explain *why* each strategy works, not just what it does. Eviction
rerank() uses a function pointer instead of duplicating the match
arms, and comparators use Ord instead of manual if-chains.

ghost.rs is unchanged (already clean).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brayniac brayniac force-pushed the brayniac/rewrite-eviction branch from a7e51a4 to 0e7c48a Compare April 19, 2026 06:23
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