ruma-api-macros: Slight simplification of api/attribute.rs

This commit is contained in:
Jonas Platte 2019-11-18 02:22:00 +01:00
parent 6ea5b9b7a1
commit eab2374253
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -33,16 +33,10 @@ impl Meta {
syn::Path {
leading_colon: None,
segments,
} => {
if segments.len() == 1 && segments[0].ident == "ruma_api" {
Some(
} if segments.len() == 1 && segments[0].ident == "ruma_api" => Some(
attr.parse_args()
.expect("ruma_api! could not parse request field attributes"),
)
} else {
None
}
}
),
_ => None,
}
}