Skip to content

Commit

Permalink
fix a clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
larry0x committed Oct 21, 2022
1 parent 27ffdc6 commit 7c755e6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions contracts/cw721-base/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,7 @@ where

// update the approval list (remove any for the same spender before adding)
let spender_addr = deps.api.addr_validate(spender)?;
token.approvals = token
.approvals
.into_iter()
.filter(|apr| apr.spender != spender_addr)
.collect();
token.approvals.retain(|apr| apr.spender != spender_addr);

// only difference between approve and revoke
if add {
Expand Down

0 comments on commit 7c755e6

Please sign in to comment.