Update dptree (again)

This commit is contained in:
Maybe Waffle 2022-04-15 14:19:46 +04:00
parent c93022028f
commit 63a7b02c68
2 changed files with 3 additions and 3 deletions

View file

@ -63,7 +63,7 @@ serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
#dptree = { version = "0.1.0" }
dptree = { git = "https://github.com/WaffleLapkin/dptree", rev = "ec7d4ec" }
dptree = { git = "https://github.com/WaffleLapkin/dptree", rev = "be04745" }
tokio = { version = "1.8", features = ["fs"] }
tokio-util = "0.6"

View file

@ -14,14 +14,14 @@ impl DpHandlerDescription {
pub(crate) fn of(allowed: AllowedUpdate) -> Self {
let mut set = HashSet::with_capacity(1);
set.insert(allowed);
Self { allowed: EventKindDescription::InterestingEventKinds(set) }
Self { allowed: EventKindDescription::InterestList(set) }
}
pub(crate) fn allowed_updates(&self) -> Vec<AllowedUpdate> {
use AllowedUpdate::*;
match &self.allowed {
EventKindDescription::InterestingEventKinds(set) => set.iter().copied().collect(),
EventKindDescription::InterestList(set) => set.iter().copied().collect(),
EventKindDescription::Entry => panic!("No updates were allowed"),
EventKindDescription::UserDefined => vec![
Message,