Add FIXME rewrite reminder for "define_message_ext"

This commit is contained in:
Сырцев Вадим Игоревич 2024-01-05 18:22:42 +03:00
parent 0993cbc5ae
commit f3ade10d00
2 changed files with 6 additions and 0 deletions

View file

@ -1201,6 +1201,8 @@ mod getters {
} }
} }
// FIXME: remove references to small values (requires changing
// `define_message_ext`)
#[must_use] #[must_use]
pub fn migrate_to_chat_id(&self) -> Option<&ChatId> { pub fn migrate_to_chat_id(&self) -> Option<&ChatId> {
match &self.kind { match &self.kind {
@ -1212,6 +1214,8 @@ mod getters {
} }
} }
// FIXME: remove references to small values (requires changing
// `define_message_ext`)
#[must_use] #[must_use]
pub fn migrate_from_chat_id(&self) -> Option<&ChatId> { pub fn migrate_from_chat_id(&self) -> Option<&ChatId> {
match &self.kind { match &self.kind {

View file

@ -53,6 +53,8 @@ mod private {
impl Sealed for Message {} impl Sealed for Message {}
} }
// FIXME: rewrite this macro to allow the usage of functions returning small
// values without borrowing
macro_rules! define_message_ext { macro_rules! define_message_ext {
($( ($func:ident, $fn_name:path) ,)*) => { ($( ($func:ident, $fn_name:path) ,)*) => {
define_ext! { define_ext! {