Fix single_match lint in rust 1.60
With the new edition of rust this new lint has been introduced. It
checks for match statements where only one match arm actually does
anything. The recommended fix is to replace it with an `if let` statement.
@@ -446,11 +446,10 @@ impl Handler for AuthCompleteHandler {
context.source_connection_id()
);
- match self
+ if let Err(err) = self
.auth_manager
.received_complete(context.source_connection_id())
{
- Err(err) => {
send_authorization_error(
&self.auth_manager,
context.source_id(),
@@ -458,9 +457,6 @@ impl Handler for AuthCompleteHandler {
sender,
&err.to_string(),
)?;
- return Ok(());
- }
- Ok(()) => (),
}
Ok(())
