-
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 some generic type definition #85
Conversation
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! Much better than now! Thanks a lot! 🥰
<<A as Adapter>::PointerOps as PointerOps>::Pointer: Clone, | ||
{ | ||
} | ||
|
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.
(Is the empty line between automated added by IDE? Or some format setting needs to be enabled? I'll enable it by default.
@@ -15,6 +15,7 @@ | |||
#![feature(associated_type_bounds)] | |||
#![feature(ptr_metadata)] | |||
#![feature(trait_alias)] | |||
#![feature(return_position_impl_trait_in_trait)] |
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.
Interesting feature!
) -> impl Iterator<Item = &'_ <<Self::Adapter as Adapter>::PointerOps as PointerOps>::Pointer> + '_; | ||
} | ||
|
||
pub trait EvictionPolicyExt: EvictionPolicy { |
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.
Good idea!
@@ -25,12 +25,9 @@ use parking_lot::Mutex; | |||
use std::hash::Hasher; | |||
use twox_hash::XxHash64; | |||
|
|||
pub struct CacheConfig<K, V, E, EL> | |||
pub struct CacheConfig<E> |
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.
Nice save!
Codecov Report
@@ Coverage Diff @@
## main #85 +/- ##
==========================================
- Coverage 67.19% 67.16% -0.03%
==========================================
Files 33 33
Lines 4682 4678 -4
==========================================
- Hits 3146 3142 -4
Misses 1536 1536
|
* refactor: simplify some generic type definition * run clippy
As titled.