Removed inlines

This commit is contained in:
2024-05-13 13:58:56 +03:00
parent 064ec22e51
commit 25b02ba99a
42 changed files with 0 additions and 100 deletions

View File

@@ -1,7 +1,6 @@
use crate::prelude::*;
/// Handles the messages which weren't matched by any commands or states
#[inline]
pub async fn default(bot: Throttle<Bot>, msg: Message, locale: LocaleRef) -> crate::Result<()> {
bot.send_message(msg.chat.id, &locale.unknown_command_use_help)
.reply_markup(deletion_markup(locale))

View File

@@ -1,7 +1,6 @@
use crate::prelude::*;
/// Deletes the message without returning errors
#[inline]
pub async fn delete_message(bot: Throttle<Bot>, msg: Message) {
let ids = MessageIds::from(&msg);
if let Err(err) = ids.delete(&bot).await {

View File

@@ -1,13 +1,11 @@
use crate::prelude::*;
use teloxide::{dispatching::DpHandlerDescription, dptree::Handler};
#[inline]
#[allow(clippy::needless_pass_by_value)]
fn has_no_user_info(msg: Message) -> bool {
msg.from().is_none()
}
#[inline]
async fn notify_about_no_user_info(
bot: Throttle<Bot>,
msg: Message,
@@ -48,7 +46,6 @@ async fn notify_about_no_user_info(
}
/// Gets a handler that filters out the messages without user information
#[inline]
pub fn get_handler() -> Handler<'static, DependencyMap, crate::Result<()>, DpHandlerDescription> {
dptree::filter(has_no_user_info).endpoint(notify_about_no_user_info)
}

View File

@@ -13,7 +13,6 @@ type DynError = Arc<dyn std::error::Error + Send + Sync>;
///
/// Returns None if account exists, Some(None) if there's an account and Some(Some(DynError)) if an error occures.
/// The String represents the error that occured
#[inline]
async fn master_pass_exists(update: Update, db: Pool) -> Option<Option<DynError>> {
let user_id = match update.user() {
Some(user) => user.id.0,
@@ -26,7 +25,6 @@ async fn master_pass_exists(update: Update, db: Pool) -> Option<Option<DynError>
}
}
#[inline]
async fn notify_about_no_master_pass(
bot: Throttle<Bot>,
locale: LocaleRef,
@@ -46,7 +44,6 @@ 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)
}