summaryrefslogtreecommitdiffstats
path: root/tokio-macros
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-macros')
-rw-r--r--tokio-macros/src/lib.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/tokio-macros/src/lib.rs b/tokio-macros/src/lib.rs
index 3a7b9ec4..2d24dd9a 100644
--- a/tokio-macros/src/lib.rs
+++ b/tokio-macros/src/lib.rs
@@ -66,15 +66,12 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
let mut runtime = RuntimeType::Multi;
for arg in args {
- match arg {
- syn::NestedMeta::Meta(syn::Meta::Word(ident)) => {
- match ident.to_string().to_lowercase().as_str() {
- "multi_thread" => runtime = RuntimeType::Multi,
- "single_thread" => runtime = RuntimeType::Single,
- name => panic!("Unknown attribute {} is specified", name),
- }
+ if let syn::NestedMeta::Meta(syn::Meta::Word(ident)) = arg {
+ match ident.to_string().to_lowercase().as_str() {
+ "multi_thread" => runtime = RuntimeType::Multi,
+ "single_thread" => runtime = RuntimeType::Single,
+ name => panic!("Unknown attribute {} is specified", name),
}
- _ => (),
}
}