-
-
Notifications
You must be signed in to change notification settings - Fork 431
extract small_map as separate utility crate #4214
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
base: main
Are you sure you want to change the base?
Conversation
@jedel1043 I think I did something wrong |
@jedel1043 i added docs here |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4214 +/- ##
==========================================
+ Coverage 47.24% 52.59% +5.34%
==========================================
Files 476 487 +11
Lines 46892 51965 +5073
==========================================
+ Hits 22154 27330 +5176
+ Misses 24738 24635 -103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Looks good! Thank you!
I propose minor gramatical / style enhancements that don't prevent the merge from my side.
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
Co-authored-by: Iban Eguia Moraza <[email protected]>
@Razican i commited your suggestions |
your git history doesn't look right anymore, can you run |
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.
This is looking great! Thanks for working on this! It's really appreciated 😄
Had a couple points that I noticed when reviewing.
@@ -219,6 +224,7 @@ impl<'a, K: Ord, V, const ARRAY_SIZE: usize> OccupiedEntry<'a, K, V, ARRAY_SIZE> | |||
|
|||
/// Sets the value of the entry with the `OccupiedEntry`'s key, | |||
/// and returns the entry's old value. | |||
#[must_use] |
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.
Huh, actually after seeing the broken lints, I'm wondering if both insert
and remove
should have a must_use
attribute. It might be a bit too strict
While the failure's aren't exactly incorrect, it feels like a negative of the API to force users to use let _ = map.insert(value)
vs. map.insert(value)
keywords = ["small", "map"] | ||
categories = ["data-structures"] | ||
readme = "../../README.md" | ||
description = "Utility library that add SmallMap data structure" |
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.
Maybe describe the data-structure instead, something like SmallMap is an inline vec that grows into a heap map past ARRAY_SIZE
@@ -0,0 +1,22 @@ | |||
[package] | |||
name = "small_map" |
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.
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.
small_btree
?
Co-authored-by: Haled Odat <[email protected]>
This Pull Request closes #4184 .
It changes the following: