Skip to content
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

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

wenym1
Copy link
Collaborator

@wenym1 wenym1 commented Jul 25, 2023

As titled.

Copy link
Owner

@MrCroxx MrCroxx left a 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,
{
}

Copy link
Owner

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)]
Copy link
Owner

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 {
Copy link
Owner

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>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice save!

@codecov-commenter
Copy link

Codecov Report

Merging #85 (687a158) into main (af1e04a) will decrease coverage by 0.03%.
The diff coverage is 85.71%.

@@            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              
Files Changed Coverage Δ
foyer-intrusive/src/eviction/lfu.rs 87.64% <0.00%> (ø)
foyer-intrusive/src/eviction/lru.rs 65.47% <0.00%> (ø)
foyer-storage/src/region.rs 67.49% <50.00%> (ø)
foyer-intrusive/src/eviction/mod.rs 64.70% <66.66%> (ø)
foyer-intrusive/src/eviction/fifo.rs 95.81% <100.00%> (ø)
foyer-memory/src/lib.rs 98.55% <100.00%> (ø)
foyer-storage/src/flusher.rs 88.99% <100.00%> (-0.11%) ⬇️
foyer-storage/src/reclaimer.rs 84.55% <100.00%> (-0.13%) ⬇️
foyer-storage/src/region_manager.rs 91.22% <100.00%> (-0.16%) ⬇️
foyer-storage/src/store.rs 82.06% <100.00%> (-0.04%) ⬇️

@MrCroxx MrCroxx merged commit 72731f7 into MrCroxx:main Jul 26, 2023
5 checks passed
@MrCroxx MrCroxx added the feature New feature or request label Jul 26, 2023
MrCroxx pushed a commit that referenced this pull request Apr 17, 2024
* refactor: simplify some generic type definition

* run clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants