Improve match statement (#8817)

This commit is contained in:
Ayush Mishra authored and GitHub committed 2021-05-15 21:43:58 +02:00
1 parent eaccde2ddc
commit c28ab1fcac
3 files changed
+5 -20

No files matched your search

@@ -239,8 +239,5 @@ fn generate_call_to_trait(
/// Returns if the given `Signature` takes a `self` argument.
fn takes_self_argument(sig: &Signature) -> bool {
match sig.inputs.first() {
Some(FnArg::Receiver(_)) => true,
_ => false,
}
matches!(sig.inputs.first(), Some(FnArg::Receiver(_)))
}