diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-07 17:52:18 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:59 +0200 |
commit | baecfecbf953aa9e40f16084b927f35b69efc8f0 (patch) | |
tree | bac7c53d32187d6eff22d231dd556b4ada40d50f /openpgp/src/regex | |
parent | 4d7ecc72b384a9c30e7024eb2ebfaede9882db06 (diff) |
Lint: Use matches! macro.
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
Diffstat (limited to 'openpgp/src/regex')
-rw-r--r-- | openpgp/src/regex/mod.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/openpgp/src/regex/mod.rs b/openpgp/src/regex/mod.rs index 1e9e3d7d..6d3cd408 100644 --- a/openpgp/src/regex/mod.rs +++ b/openpgp/src/regex/mod.rs @@ -923,11 +923,7 @@ impl RegexSet { /// # Ok(()) } /// ``` pub fn matches_everything(&self) -> bool { - if let RegexSet_::Everything = self.re_set { - true - } else { - false - } + matches!(self.re_set, RegexSet_::Everything) } /// Controls whether strings with control characters are allowed. |