foyer-rs / foyer

Hybrid in-memory and disk cache in Rust
https://foyer.rs
Apache License 2.0
291 stars 20 forks source link

feat: use equivalent to loose the key trait bounds #774

Closed MrCroxx closed 2 weeks ago

MrCroxx commented 2 weeks ago

Signed-off-by: MrCroxx mrcroxx@outlook.com## What's changed and what's your intention?

Please explain IN DETAIL what the changes are in this PR and why they are needed. :D

See examples/equivalent.rs for usage. 🥵

This PR modifies the public API trait bounds, but only looses them. So, there is no need to bump a major version. 🥵

Checklist

Related issues or PRs (optional)

close #378

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
foyer-memory/src/generic.rs 66.66% 2 Missing :warning:
Files with missing lines Coverage Δ
foyer-memory/src/cache.rs 84.55% <ø> (-0.04%) :arrow_down:
foyer-memory/src/indexer/hash_table.rs 100.00% <100.00%> (ø)
foyer-memory/src/indexer/sanity.rs 100.00% <100.00%> (ø)
foyer-storage/src/store.rs 85.23% <100.00%> (-0.11%) :arrow_down:
foyer-storage/src/test_utils.rs 88.46% <100.00%> (-0.22%) :arrow_down:
foyer/src/hybrid/cache.rs 82.33% <100.00%> (-0.39%) :arrow_down:
foyer-memory/src/generic.rs 90.79% <66.66%> (+0.21%) :arrow_up: