diff --git a/src/handlers/callbacks/delete_message.rs b/src/handlers/callbacks/delete_message.rs index 20195dd..9f80183 100644 --- a/src/handlers/callbacks/delete_message.rs +++ b/src/handlers/callbacks/delete_message.rs @@ -21,6 +21,7 @@ fn filter(q: CallbackQuery) -> bool { } /// Gets a handler for deleting the message +#[inline] pub fn get_handler() -> Handler<'static, DependencyMap, crate::Result<()>, DpHandlerDescription> { dptree::filter(filter).endpoint(run) } diff --git a/src/handlers/commands/gen_password.rs b/src/handlers/commands/gen_password.rs index 6ee1f1f..367fd3a 100644 --- a/src/handlers/commands/gen_password.rs +++ b/src/handlers/commands/gen_password.rs @@ -28,6 +28,7 @@ fn check_generated_password(password: &[u8]) -> bool { } /// Continuously generates the password until it passes the checks +#[inline] fn generete_passwords() -> ArrayVec, 10> { let mut passwords = ArrayVec::new_const(); while !passwords.is_full() { diff --git a/src/handlers/master_password_check.rs b/src/handlers/master_password_check.rs index 2c2228e..252de57 100644 --- a/src/handlers/master_password_check.rs +++ b/src/handlers/master_password_check.rs @@ -37,6 +37,7 @@ async fn notify_about_no_master_pass( } /// Gets a handler that filters out the messages of users that don't have a master password set +#[inline] pub fn get_handler() -> Handler<'static, DependencyMap, crate::Result<()>, DpHandlerDescription> { dptree::filter_map_async(master_pass_exists).endpoint(notify_about_no_master_pass) } diff --git a/src/handlers/state/generic.rs b/src/handlers/state/generic.rs index 6f0bf44..3d4ee81 100644 --- a/src/handlers/state/generic.rs +++ b/src/handlers/state/generic.rs @@ -7,6 +7,7 @@ use sea_orm::prelude::*; use teloxide::{adaptors::Throttle, prelude::*}; /// A generic state handler. It checks for "/cancel" messages and runs the provided validation function +#[inline] pub async fn generic( bot: Throttle, msg: Message, diff --git a/src/handlers/utils.rs b/src/handlers/utils.rs index 86d6160..c21c3eb 100644 --- a/src/handlers/utils.rs +++ b/src/handlers/utils.rs @@ -23,6 +23,7 @@ where } /// Deletes the message ignoring the errors +#[inline] pub async fn delete_message(bot: Throttle, msg: Message) { let _ = bot.delete_message(msg.chat.id, msg.id).await; }