Improve match statement (#8817)

This commit is contained in:
Ayush Mishra
2021-05-16 01:13:58 +05:30
committed by GitHub
parent eaccde2ddc
commit c28ab1fcac
3 changed files with 5 additions and 20 deletions
@@ -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(_)))
}