mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 23:25:03 +00:00
Fix formatting and use Iterator::any
This commit is contained in:
parent
b0f7aac72f
commit
c8d915e2ea
2 changed files with 3 additions and 3 deletions
|
@ -292,10 +292,10 @@ impl Attrs {
|
|||
}
|
||||
|
||||
pub fn has_doc_hidden(&self) -> bool {
|
||||
self.by_key("doc").tt_values().find(|tt| {
|
||||
self.by_key("doc").tt_values().any(|tt| {
|
||||
tt.delimiter_kind() == Some(DelimiterKind::Parenthesis) &&
|
||||
matches!(&*tt.token_trees, [tt::TokenTree::Leaf(tt::Leaf::Ident(ident))] if ident.text == "hidden")
|
||||
}).is_some()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue