-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: simplify pointer trait and remove DefaultPointerOps #100
Conversation
Codecov Report
@@ Coverage Diff @@
## main #100 +/- ##
==========================================
- Coverage 67.60% 67.29% -0.32%
==========================================
Files 41 41
Lines 5091 5014 -77
==========================================
- Hits 3442 3374 -68
+ Misses 1649 1640 -9
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General LGTM.
foyer-intrusive/src/eviction/mod.rs
Outdated
use std::fmt::Debug; | ||
|
||
pub trait Config = Send + Sync + 'static + Debug + Clone; | ||
|
||
pub trait EvictionPolicy: Send + Sync + 'static { | ||
type Adapter: Adapter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a little not unified here compared with other intrusive collections. Can we still use Adapter
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the great work!
* refactor: simplify some generic type definition * refactor: simplify pointer trait and remove DefaultPointerOps * run clippy * fix test compile * rename PointerOps to Pointer * use adapter in eviction policy associated type
What's changed and what's your intention?
As titled.
Checklist
make check
andmake test
in my local envirorment.Related issues or PRs (optional)