From 6ec6c96709ac40cb85af23bbd8a39240bbf72c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Granh=C3=A3o?= <32176319+danielgranhao@users.noreply.github.com> Date: Thu, 23 Jan 2025 09:42:10 +0000 Subject: [PATCH] Fix new clippy warnings (#689) --- lib/Cargo.toml | 3 +++ lib/core/src/recover/model.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 29c8125..ae36b09 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -33,6 +33,9 @@ version = "0.4.0-rc3" [workspace.lints.clippy] empty_line_after_doc_comments = "allow" +[workspace.lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(frb_expand)'] } + [workspace.dependencies] anyhow = "1.0" log = "0.4.20" diff --git a/lib/core/src/recover/model.rs b/lib/core/src/recover/model.rs index d10a28a..a652189 100644 --- a/lib/core/src/recover/model.rs +++ b/lib/core/src/recover/model.rs @@ -206,7 +206,7 @@ impl RecoveredOnchainDataChainReceive { ) -> Option { let is_refundable = self.btc_user_lockup_address_balance_sat > 0 && (is_expired - || expected_user_lockup_amount_sat.map_or(false, |expected_lockup_amount_sat| { + || expected_user_lockup_amount_sat.is_some_and(|expected_lockup_amount_sat| { expected_lockup_amount_sat != self.btc_user_lockup_amount_sat })); match &self.btc_user_lockup_tx_id {