ruma-api-macros: Slight simplification of api/attribute.rs
This commit is contained in:
parent
6ea5b9b7a1
commit
eab2374253
@ -33,16 +33,10 @@ impl Meta {
|
|||||||
syn::Path {
|
syn::Path {
|
||||||
leading_colon: None,
|
leading_colon: None,
|
||||||
segments,
|
segments,
|
||||||
} => {
|
} if segments.len() == 1 && segments[0].ident == "ruma_api" => Some(
|
||||||
if segments.len() == 1 && segments[0].ident == "ruma_api" {
|
attr.parse_args()
|
||||||
Some(
|
.expect("ruma_api! could not parse request field attributes"),
|
||||||
attr.parse_args()
|
),
|
||||||
.expect("ruma_api! could not parse request field attributes"),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user