Skip to content

Commit 588911c

Browse files
committed
nostr: fix clippy for MSRV
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent e7f4c88 commit 588911c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

crates/nostr/src/nips/nip47.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -725,12 +725,9 @@ impl Response {
725725
}
726726
Method::ListTransactions => {
727727
let transactions: Value =
728-
result
729-
.get("transactions")
730-
.cloned()
731-
.ok_or(Error::UnexpectedResult(String::from(
732-
"Missing 'transactions' field",
733-
)))?;
728+
result.get("transactions").cloned().ok_or_else(|| {
729+
Error::UnexpectedResult(String::from("Missing 'transactions' field"))
730+
})?;
734731
let result: Vec<LookupInvoiceResponseResult> =
735732
serde_json::from_value(transactions)?;
736733
ResponseResult::ListTransactions(result)

0 commit comments

Comments
 (0)