mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +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()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ impl A {
|
|||
expect![[r#"
|
||||
fd pub_field u32
|
||||
me pub_method() fn(&self)
|
||||
"#]]
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue