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 <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-10-29 19:39:12 +08:00
parent 67adccf16a
commit ef33cc577f

View file

@ -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 {