Pass IndexStat by ref in store_stats_of

This commit is contained in:
Louis Dureuil 2023-03-07 14:00:54 +01:00
parent 76288fad72
commit 7faa9a22f6
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -850,7 +850,7 @@ impl IndexScheduler {
let index_rtxn = index.read_txn()?;
let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?;
let mut wtxn = self.env.write_txn()?;
self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?;
self.index_mapper.store_stats_of(&mut wtxn, &index_uid, &stats)?;
wtxn.commit()?;
Ok(())
}();
@ -905,7 +905,7 @@ impl IndexScheduler {
let mut wtxn = self.env.write_txn()?;
let index_rtxn = index.read_txn()?;
let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?;
self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?;
self.index_mapper.store_stats_of(&mut wtxn, &index_uid, &stats)?;
wtxn.commit()?;
Ok(())
}();