Browse Source

Use matches! instead of match

pull/53/head
Rodolphe Bréard 4 years ago
parent
commit
c9d3ccf609
  1. 12
      acmed/src/acme_proto.rs

12
acmed/src/acme_proto.rs

@ -50,12 +50,12 @@ impl fmt::Display for Challenge {
impl PartialEq<structs::Challenge> for Challenge { impl PartialEq<structs::Challenge> for Challenge {
fn eq(&self, other: &structs::Challenge) -> bool { fn eq(&self, other: &structs::Challenge) -> bool {
match (self, other) { matches!(
(Challenge::Http01, structs::Challenge::Http01(_)) => true, (self, other),
(Challenge::Dns01, structs::Challenge::Dns01(_)) => true, (Challenge::Http01, structs::Challenge::Http01(_))
(Challenge::TlsAlpn01, structs::Challenge::TlsAlpn01(_)) => true, | (Challenge::Dns01, structs::Challenge::Dns01(_))
_ => false, | (Challenge::TlsAlpn01, structs::Challenge::TlsAlpn01(_))
} )
} }
} }

|||||||
100:0
Loading…
Cancel
Save