-
Notifications
You must be signed in to change notification settings - Fork 286
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
aya/maps: allow constructing HashMaps from LruHashMap #774
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
aya/src/maps/mod.rs
Outdated
impl_try_from_map_generic_key_and_value!(HashMap, PerCpuHashMap, LpmTrie); | ||
impl_try_from_map_generic_key_and_value!( | ||
(HashMap|LruHashMap) => HashMap, | ||
PerCpuHashMap, |
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.
Does PerCpuLruHashMap have the same bug?
@ajwerner, this pull request is now in conflict and requires a rebase. |
26fcce9
to
06934ae
Compare
b755cad
to
188aef8
Compare
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.
Reviewed 4 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ajwerner)
aya/src/maps/hash_map/per_cpu_hash_map.rs
line 152 at r2 (raw file):
#[cfg(test)] mod tests {
nit: this empty line is inconsistent with other modules
The macro to implement TryFrom for MapData didn't have the ability to specify that more than one variant of MapData can be valid for a single map implementation. Support for new syntax was added to the macro so that the implementation can succeed for both valid variants in the HashMap and PerCpuHashMap impl. Fixes aya-rs#636
188aef8
to
172859c
Compare
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.
TFTR!
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @ajwerner)
aya/src/maps/hash_map/per_cpu_hash_map.rs
line 152 at r2 (raw file):
Previously, tamird (Tamir Duberstein) wrote…
nit: this empty line is inconsistent with other modules
Done.
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ajwerner)
The macro to implement TryFrom for MapData didn't have the ability to
specify that more than one variant of MapData can be valid for a single
map implementation. Support for new syntax was added to the macro so that
the implementation can succeed for both valid variants in the HashMap
and PerCpuHashMap impls.
Fixes #636
This change is