Remove unnecessary cloning in overwrite_with (#8580)

* Remove unnecessary cloning in overwrite_with

* Remove into_iter
This commit is contained in:
Wei Tang 2018-05-10 00:41:56 +08:00 committed by Robert Habermeier
parent cb7ad2366d
commit cddc33bb24

View File

@ -460,7 +460,7 @@ impl Account {
self.address_hash = other.address_hash;
let mut cache = self.storage_cache.borrow_mut();
for (k, v) in other.storage_cache.into_inner() {
cache.insert(k.clone() , v.clone()); //TODO: cloning should not be required here
cache.insert(k, v);
}
self.storage_changes = other.storage_changes;
}