-
Notifications
You must be signed in to change notification settings - Fork 355
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
Implement range_de for SnapshotMap #497
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.
Took a quick look and it seems correct to me.
Maybe @maurolacy can give some feedback as you work on porting this to the IndexedMap types. (And I guess we would want such range_de on the indexes??? but that is definitely a separate PR. glad to have a few smaller PRs that can get reviewed and merged quickly.)
.range_de(&store, None, None, Order::Ascending) | ||
.collect(); | ||
let all = all.unwrap(); | ||
assert_eq!(2, all.len()); |
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.
Better to remove this.
The next check also asserts this, but gives more info on failure.
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.
Fair. We do this in other places I think.
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.
Yes, we started removing some of those in recent PR reviews, which is why I point this out.
Nice to read other PR reviews also to see discussions on APIs and best practices... I think that is where the code style really gets hashed out
.collect(); | ||
let all = all.unwrap(); | ||
assert_eq!(2, all.len()); | ||
assert_eq!(all, vec![(b"C".to_vec(), 13), (b"D".to_vec(), 22)]); |
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 demo showing the deserialisation.
One thing I'm wondering is if we have a desired representation when serializing IndexedMap type stuff, or if it's just a matter of it being consistent with how it's deserialized. |
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.
Deals with #461, but doesn't close it