From c99f42347c601949d98a8262a86ef74bbb883e17 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 30 Jun 2022 16:52:08 +0200 Subject: [PATCH] chore(bindings/crypto-nodejs): Simplify code by removing `matches!`. --- bindings/matrix-sdk-crypto-nodejs/src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/matrix-sdk-crypto-nodejs/src/types.rs b/bindings/matrix-sdk-crypto-nodejs/src/types.rs index e0d66c25e..418e5a921 100644 --- a/bindings/matrix-sdk-crypto-nodejs/src/types.rs +++ b/bindings/matrix-sdk-crypto-nodejs/src/types.rs @@ -129,14 +129,14 @@ impl MaybeSignature { /// Check whether the signature has been successfully decoded. #[napi(getter)] pub fn is_valid(&self) -> bool { - matches!(self.inner, Ok(_)) + self.inner.is_ok() } /// Check whether the signature could not have been successfully /// decoded. #[napi(getter)] pub fn is_invalid(&self) -> bool { - matches!(self.inner, Err(_)) + self.inner.is_err() } /// The signature, if successfully decoded.