Nits
This commit is contained in:
parent
a9dbf63087
commit
f624d55ea7
3 changed files with 15 additions and 1 deletions
|
@ -68,7 +68,14 @@ pub(crate) fn extension(
|
|||
|
||||
/// Only keep `#[doc]` attrs.
|
||||
fn scrub_attrs(attrs: &[Attribute]) -> Vec<Attribute> {
|
||||
attrs.into_iter().cloned().filter(|attr| attr.path().segments[0].ident == "doc").collect()
|
||||
attrs
|
||||
.into_iter()
|
||||
.cloned()
|
||||
.filter(|attr| {
|
||||
let ident = &attr.path().segments[0].ident;
|
||||
ident == "doc" || ident == "must_use"
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Scrub arguments so that they're valid for trait signatures.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue