Fix formatting and use Iterator::any

This commit is contained in:
Jonas Schievink 2021-07-23 16:45:14 +02:00
parent b0f7aac72f
commit c8d915e2ea
2 changed files with 3 additions and 3 deletions

View file

@ -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()
})
}
}

View file

@ -231,7 +231,7 @@ impl A {
expect![[r#"
fd pub_field u32
me pub_method() fn(&self)
"#]]
"#]],
)
}