clippy improvement

This commit is contained in:
Robin Müller 2022-06-11 02:00:44 +02:00
parent 8c94c5300d
commit ab7ef418f6
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -158,12 +158,9 @@ mod tests {
fn check_handled_event(res: HandlerResult, expected: Event, expected_num_sent: u32) {
assert!(matches!(res, HandlerResult::Handled { .. }));
match res {
HandlerResult::Handled(num_recipients, event) => {
assert_eq!(event, expected);
assert_eq!(num_recipients, expected_num_sent);
}
_ => (),
if let HandlerResult::Handled(num_recipients, event) = res {
assert_eq!(event, expected);
assert_eq!(num_recipients, expected_num_sent);
}
}