diff --git a/objects/src/accounts/delta/storage.rs b/objects/src/accounts/delta/storage.rs index 7ef1bd7ba..9bd1e3ce8 100644 --- a/objects/src/accounts/delta/storage.rs +++ b/objects/src/accounts/delta/storage.rs @@ -1,6 +1,5 @@ -use std::collections::HashMap; - use alloc::{string::ToString, vec::Vec}; +use std::collections::HashMap; use super::{ AccountDeltaError, ByteReader, ByteWriter, Deserializable, DeserializationError, Felt, diff --git a/objects/src/accounts/delta/vault.rs b/objects/src/accounts/delta/vault.rs index 4c7150b19..d1be396c7 100644 --- a/objects/src/accounts/delta/vault.rs +++ b/objects/src/accounts/delta/vault.rs @@ -1,6 +1,5 @@ -use std::collections::HashMap; - use alloc::{string::ToString, vec::Vec}; +use std::collections::HashMap; use super::{ AccountDeltaError, Asset, ByteReader, ByteWriter, Deserializable, DeserializationError, @@ -55,12 +54,8 @@ impl AccountVaultDelta { .chain(other.removed_assets.into_iter().map(|asset| (asset, false))) .collect::>(); - let added = assets - .iter() - .filter_map(|(asset, was_added)| was_added.then_some(asset.clone())); - let removed = assets - .iter() - .filter_map(|(asset, was_added)| (!was_added).then_some(asset.clone())); + let added = assets.iter().filter_map(|(asset, was_added)| was_added.then_some(*asset)); + let removed = assets.iter().filter_map(|(asset, was_added)| (!was_added).then_some(*asset)); Self::from_iterators(added, removed) }