-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore(trie): remove PrefixSetMut::contains
#10466
Conversation
/// assert!(prefix_set.contains(&[0xa, 0xb])); | ||
/// assert!(prefix_set.contains(&[0xa, 0xb, 0xc])); | ||
/// ``` | ||
#[derive(Clone, Default, Debug)] | ||
pub struct PrefixSetMut { | ||
keys: Vec<Nibbles>, | ||
sorted: bool, |
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.
should always be treated as unsorted
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.
don't love the Abstraction
suffix, be looks like we already use this this for PrefixSet
use std::collections::BTreeSet; | ||
|
||
pub trait PrefixSetMutAbstraction: Default { |
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.
needs docs
@mattsse doesn't matter really since this is used only for benching |
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.
gotcha
Description
Remove
PrefixSetMut::contains
given that this is a mutable collection not intended for searching.