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 /ipc/src | |
parent | 4d7ecc72b384a9c30e7024eb2ebfaede9882db06 (diff) |
Lint: Use matches! macro.
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
Diffstat (limited to 'ipc/src')
-rw-r--r-- | ipc/src/assuan/mod.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ipc/src/assuan/mod.rs b/ipc/src/assuan/mod.rs index 0e503308..a3276210 100644 --- a/ipc/src/assuan/mod.rs +++ b/ipc/src/assuan/mod.rs @@ -416,26 +416,17 @@ impl Response { /// Returns true if this message indicates success. pub fn is_ok(&self) -> bool { - match self { - Response::Ok { .. } => true, - _ => false, - } + matches!(self, Response::Ok { .. } ) } /// Returns true if this message indicates an error. pub fn is_err(&self) -> bool { - match self { - Response::Error { .. } => true, - _ => false, - } + matches!(self, Response::Error { .. }) } /// Returns true if this message is an inquiry. pub fn is_inquire(&self) -> bool { - match self { - Response::Inquire { .. } => true, - _ => false, - } + matches!(self, Response::Inquire { .. }) } /// Returns true if this response concludes the server's response. |