From 31f53f58fcd672f9010a42e0657a7a75711bd7da Mon Sep 17 00:00:00 2001 From: TheAwiteb Date: Tue, 12 Sep 2023 07:50:31 +0300 Subject: [PATCH] More check that is a doc comment --- crates/teloxide-macros/src/command_attr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/teloxide-macros/src/command_attr.rs b/crates/teloxide-macros/src/command_attr.rs index 58ca93e9..e34b6c27 100644 --- a/crates/teloxide-macros/src/command_attr.rs +++ b/crates/teloxide-macros/src/command_attr.rs @@ -144,7 +144,7 @@ fn is_command_attribute(a: &Attribute) -> bool { pub(crate) fn is_doc_comment(a: &Attribute) -> bool { match a.path.get_ident() { - Some(ident) => ident == "doc", + Some(ident) => ident == "doc" && a.tokens.to_string().starts_with("= \""), _ => false, } }