Skip to content

Commit 0dff8c1

Browse files
committed
chore(deps): upgrade teloxide to 0.13
1 parent 999a384 commit 0dff8c1

File tree

3 files changed

+51
-36
lines changed

3 files changed

+51
-36
lines changed

Cargo.lock

+44-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
teloxide = { version = "0.12", features = ["macros"] }
9+
teloxide = { version = "0.13", features = ["macros"] }
1010
log = "0.4"
1111
pretty_env_logger = "0.4"
1212
tokio = { version = "1.8", features = ["rt-multi-thread", "macros"] }

src/commands.rs

+6-14
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,11 @@ use teloxide::{
1111

1212
use crate::{
1313
cmd_authentication::{
14-
admin_list, admin_remove, authenticate, authorizations, authorize, unauthorize
15-
},
16-
cmd_bureau::bureau,
17-
cmd_poll::{
18-
choose_target,
19-
set_quote,
20-
start_poll_dialogue,
21-
stats, PollState
22-
},
23-
HandlerResult
14+
admin_list, admin_remove, authenticate, authorizations, authorize, unauthorize,
15+
},
16+
cmd_bureau::bureau,
17+
cmd_poll::{choose_target, set_quote, start_poll_dialogue, stats, PollState},
18+
HandlerResult,
2419
};
2520

2621
pub fn command_message_handler(
@@ -95,10 +90,7 @@ fn require_authorization() -> Endpoint<'static, DependencyMap, HandlerResult, Dp
9590
/// Required dependencies: `teloxide_core::types::message::Message`, `sqlx_sqlite::SqlitePool`
9691
fn require_admin() -> Endpoint<'static, DependencyMap, HandlerResult, DpHandlerDescription> {
9792
dptree::entry().filter_async(|msg: Message, db: Arc<SqlitePool>| async move {
98-
let MessageKind::Common(MessageCommon {
99-
from: Some(user), ..
100-
}) = msg.kind
101-
else {
93+
let Some(user) = msg.from else {
10294
return false;
10395
};
10496

0 commit comments

Comments
 (0)