1
Fork 0

Remove Option from the return type of Attribute::name()

This commit is contained in:
Seiichi Uchida 2018-01-30 14:53:01 +09:00 committed by flip1995
parent 759bd01e03
commit 9b3aea602c
No known key found for this signature in database
GPG key ID: 6757AB26F72F0084
17 changed files with 28 additions and 36 deletions

View file

@ -472,7 +472,7 @@ impl<'a> TraitDef<'a> {
attrs.extend(item.attrs
.iter()
.filter(|a| {
a.name().is_some() && match &*a.name().unwrap().as_str() {
match &*a.name().as_str() {
"allow" | "warn" | "deny" | "forbid" | "stable" | "unstable" => true,
_ => false,
}