Skip to content

Commit

Permalink
revert to unwrap_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellorigotti committed Oct 12, 2023
1 parent 52baf95 commit e93ef29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/lib/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ impl QueryApi {
block_hash: Option<state_chain_runtime::Hash>,
account_id: Option<state_chain_runtime::AccountId>,
) -> Result<bool, anyhow::Error> {
let block_hash = block_hash.unwrap_or(self.state_chain_client.latest_finalized_hash());
let account_id = account_id.unwrap_or(self.state_chain_client.account_id());
let block_hash =
block_hash.unwrap_or_else(|| self.state_chain_client.latest_finalized_hash());
let account_id = account_id.unwrap_or_else(|| self.state_chain_client.account_id());

if self
.state_chain_client
Expand Down

0 comments on commit e93ef29

Please sign in to comment.