diff --git a/crates/teloxide-core/src/types/message.rs b/crates/teloxide-core/src/types/message.rs index df88ae72..b989eca0 100644 --- a/crates/teloxide-core/src/types/message.rs +++ b/crates/teloxide-core/src/types/message.rs @@ -1201,6 +1201,8 @@ mod getters { } } + // FIXME: remove references to small values (requires changing + // `define_message_ext`) #[must_use] pub fn migrate_to_chat_id(&self) -> Option<&ChatId> { match &self.kind { @@ -1212,6 +1214,8 @@ mod getters { } } + // FIXME: remove references to small values (requires changing + // `define_message_ext`) #[must_use] pub fn migrate_from_chat_id(&self) -> Option<&ChatId> { match &self.kind { diff --git a/crates/teloxide/src/dispatching/filter_ext.rs b/crates/teloxide/src/dispatching/filter_ext.rs index 98a2d698..c0ab8e04 100644 --- a/crates/teloxide/src/dispatching/filter_ext.rs +++ b/crates/teloxide/src/dispatching/filter_ext.rs @@ -53,6 +53,8 @@ mod private { impl Sealed for Message {} } +// FIXME: rewrite this macro to allow the usage of functions returning small +// values without borrowing macro_rules! define_message_ext { ($( ($func:ident, $fn_name:path) ,)*) => { define_ext! {