Skip to content

Commit

Permalink
Fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Jun 16, 2023
1 parent b710362 commit 62e302f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions contracts/provider/vault/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,12 @@ impl VaultContract<'_> {
let mut lien_lock = self
.liens
.may_load(ctx.deps.storage, (&ctx.info.sender, lienholder))?
.unwrap_or(Lockable::new(Lien {
amount: Uint128::zero(),
slashable,
}));
.unwrap_or_else(|| {
Lockable::new(Lien {
amount: Uint128::zero(),
slashable,
})
});
let lien = lien_lock.write()?;
lien.amount += amount;

Expand Down

0 comments on commit 62e302f

Please sign in to comment.