diff options
author | Taiki Endo <te316e89@gmail.com> | 2019-07-26 03:47:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 03:47:14 +0900 |
commit | fe021e6c008a886c1c6ad97c9f5f0c667fad34c6 (patch) | |
tree | 826239d95e6f7b6511a01ab93ecdcebb9aeab06e /tokio-macros | |
parent | f311ac3d4faa4fa1203ad5586a7676604ffe7736 (diff) |
ci: enable clippy lints (#1335)
Diffstat (limited to 'tokio-macros')
-rw-r--r-- | tokio-macros/src/lib.rs | 13 |
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), } - _ => (), } } |