fix: Simplify hashmap insert now that we have Copy keys

pull/24376/head
Carol (Nichols || Goulding) 2022-11-18 10:18:21 -05:00
parent 02c3083192
commit f27c33d73e
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
1 changed files with 1 additions and 4 deletions

View File

@ -61,10 +61,7 @@ pub fn decode_database_batch(database_batch: &DatabaseBatch) -> Result<HashMap<i
let mut id_to_data = HashMap::with_capacity(database_batch.table_batches.len());
for table_batch in &database_batch.table_batches {
let (_, batch) = id_to_data
.raw_entry_mut()
.from_key(&table_batch.table_id)
.or_insert_with(|| (table_batch.table_id, MutableBatch::new()));
let batch = id_to_data.entry(table_batch.table_id).or_default();
write_table_batch(batch, table_batch)?;
}