From c9d3ccf609d6016072f7455c43970456a31920b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 13 Jun 2021 15:37:31 +0200 Subject: [PATCH] Use matches! instead of match --- acmed/src/acme_proto.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/acmed/src/acme_proto.rs b/acmed/src/acme_proto.rs index c3d3ce5..cda046d 100644 --- a/acmed/src/acme_proto.rs +++ b/acmed/src/acme_proto.rs @@ -50,12 +50,12 @@ impl fmt::Display for Challenge { impl PartialEq for Challenge { fn eq(&self, other: &structs::Challenge) -> bool { - match (self, other) { - (Challenge::Http01, structs::Challenge::Http01(_)) => true, - (Challenge::Dns01, structs::Challenge::Dns01(_)) => true, - (Challenge::TlsAlpn01, structs::Challenge::TlsAlpn01(_)) => true, - _ => false, - } + matches!( + (self, other), + (Challenge::Http01, structs::Challenge::Http01(_)) + | (Challenge::Dns01, structs::Challenge::Dns01(_)) + | (Challenge::TlsAlpn01, structs::Challenge::TlsAlpn01(_)) + ) } }