Restructure background scanner to handle refresh requests even while scanning
This commit is contained in:
parent
6d8635fa29
commit
2d97387f49
3 changed files with 283 additions and 360 deletions
|
@ -154,6 +154,12 @@ impl<K> TreeSet<K>
|
|||
where
|
||||
K: Clone + Debug + Default + Ord,
|
||||
{
|
||||
pub fn from_ordered_entries(entries: impl IntoIterator<Item = K>) -> Self {
|
||||
Self(TreeMap::from_ordered_entries(
|
||||
entries.into_iter().map(|key| (key, ())),
|
||||
))
|
||||
}
|
||||
|
||||
pub fn insert(&mut self, key: K) {
|
||||
self.0.insert(key, ());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue