From eab2374253ce9e451b87f4d6151040f5a1e26615 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 18 Nov 2019 02:22:00 +0100 Subject: [PATCH] ruma-api-macros: Slight simplification of api/attribute.rs --- ruma-api-macros/src/api/attribute.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ruma-api-macros/src/api/attribute.rs b/ruma-api-macros/src/api/attribute.rs index df610dd9..b0bbd858 100644 --- a/ruma-api-macros/src/api/attribute.rs +++ b/ruma-api-macros/src/api/attribute.rs @@ -33,16 +33,10 @@ impl Meta { syn::Path { leading_colon: None, segments, - } => { - if segments.len() == 1 && segments[0].ident == "ruma_api" { - Some( - attr.parse_args() - .expect("ruma_api! could not parse request field attributes"), - ) - } else { - None - } - } + } if segments.len() == 1 && segments[0].ident == "ruma_api" => Some( + attr.parse_args() + .expect("ruma_api! could not parse request field attributes"), + ), _ => None, } }