Skip to content

Commit

Permalink
Merge pull request #92 from CosmWasm/larry/fix-clippy-warning
Browse files Browse the repository at this point in the history
Fix a clippy warning
  • Loading branch information
JakeHartnell authored Oct 24, 2022
2 parents 4df70f9 + b3fb79d commit d27214e
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 d27214e

Please sign in to comment.