remove unnecessary iter
@@ -833,7 +833,7 @@ impl ContentSizeof<State> for sizeof::Context {
self.mask(&subscriber)?.mask(Size::new(cursor))?;
}
- let keys = user_state.exchange_keys.iter().map(|(id, xkey)| (id, xkey));
+ let keys = &user_state.exchange_keys;
let amount_keys = keys.len();
self.mask(Size::new(amount_keys))?;
for (subscriber, ke_pk) in keys {
@@ -871,7 +871,7 @@ impl<'a> ContentWrap<State> for wrap::Context<&'a mut [u8]> {
self.mask(&subscriber)?.mask(Size::new(cursor))?;
}
- let keys = user_state.exchange_keys.iter().map(|(id, xkey)| (id, xkey));
+ let keys = &user_state.exchange_keys;
let amount_keys = keys.len();
self.mask(Size::new(amount_keys))?;
for (subscriber, ke_pk) in keys {
