From ef33cc577fc7fffc665f2d7d9c760f5d81402c9f Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 29 Oct 2020 19:39:12 +0800 Subject: [PATCH] macros: use `matches!()` to fix build warning This is a new feature, and Rust really wants us to use it. Signed-off-by: Sean Cross --- macros/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 8d8835bc0..594f04099 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -66,10 +66,7 @@ pub fn xous_main(args: TokenStream, input: TokenStream) -> TokenStream { && f.sig.variadic.is_none() && match f.sig.output { ReturnType::Default => false, - ReturnType::Type(_, ref ty) => match **ty { - Type::Never(_) => true, - _ => false, - }, + ReturnType::Type(_, ref ty) => matches!(**ty, Type::Never(_)), }; if !valid_signature {