From 7c755e62cca5b99baddad47a249fcf232caa8829 Mon Sep 17 00:00:00 2001 From: larry <26318510+larry0x@users.noreply.github.com> Date: Sat, 22 Oct 2022 00:39:31 +0100 Subject: [PATCH] fix a clippy warning --- contracts/cw721-base/src/execute.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/contracts/cw721-base/src/execute.rs b/contracts/cw721-base/src/execute.rs index 2fb9aebd3..5a9edbc09 100644 --- a/contracts/cw721-base/src/execute.rs +++ b/contracts/cw721-base/src/execute.rs @@ -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 {