More check that is a doc comment

This commit is contained in:
TheAwiteb 2023-09-12 07:50:31 +03:00
parent 9545075023
commit 31f53f58fc
No known key found for this signature in database
GPG key ID: ABF818BD15DC2D34

View file

@ -144,7 +144,7 @@ fn is_command_attribute(a: &Attribute) -> bool {
pub(crate) fn is_doc_comment(a: &Attribute) -> bool { pub(crate) fn is_doc_comment(a: &Attribute) -> bool {
match a.path.get_ident() { match a.path.get_ident() {
Some(ident) => ident == "doc", Some(ident) => ident == "doc" && a.tokens.to_string().starts_with("= \""),
_ => false, _ => false,
} }
} }