mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Update dptree (again)
This commit is contained in:
parent
c93022028f
commit
63a7b02c68
2 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
||||||
#dptree = { version = "0.1.0" }
|
#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 = { version = "1.8", features = ["fs"] }
|
||||||
tokio-util = "0.6"
|
tokio-util = "0.6"
|
||||||
|
|
|
@ -14,14 +14,14 @@ impl DpHandlerDescription {
|
||||||
pub(crate) fn of(allowed: AllowedUpdate) -> Self {
|
pub(crate) fn of(allowed: AllowedUpdate) -> Self {
|
||||||
let mut set = HashSet::with_capacity(1);
|
let mut set = HashSet::with_capacity(1);
|
||||||
set.insert(allowed);
|
set.insert(allowed);
|
||||||
Self { allowed: EventKindDescription::InterestingEventKinds(set) }
|
Self { allowed: EventKindDescription::InterestList(set) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn allowed_updates(&self) -> Vec<AllowedUpdate> {
|
pub(crate) fn allowed_updates(&self) -> Vec<AllowedUpdate> {
|
||||||
use AllowedUpdate::*;
|
use AllowedUpdate::*;
|
||||||
|
|
||||||
match &self.allowed {
|
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::Entry => panic!("No updates were allowed"),
|
||||||
EventKindDescription::UserDefined => vec![
|
EventKindDescription::UserDefined => vec![
|
||||||
Message,
|
Message,
|
||||||
|
|
Loading…
Reference in a new issue