Avoid use of PatriciaMap.insert_str to avoid causing bug

This commit is contained in:
Olivier 'reivilibre' 2023-05-26 22:58:37 +01:00
parent 5ffbf4fc1c
commit 1bd46b934d
3 changed files with 3 additions and 3 deletions

View File

@ -340,7 +340,7 @@ async fn backup_dir_sources(
while let Ok(((dir_source_idx, job_id), rec_chunk_ref, real_size)) = while let Ok(((dir_source_idx, job_id), rec_chunk_ref, real_size)) =
pipeline.next_result().await pipeline.next_result().await
{ {
chunk_file_maps[dir_source_idx].insert_str(&job_id, (rec_chunk_ref, real_size)); chunk_file_maps[dir_source_idx].insert(&job_id, (rec_chunk_ref, real_size));
completed += 1; completed += 1;
Span::current().pb_inc(1); Span::current().pb_inc(1);
} }

View File

@ -487,7 +487,7 @@ async fn main() -> eyre::Result<()> {
async { async {
while let Ok((job_id, rec_chunk_ref, real_size)) = pipeline.next_result().await while let Ok((job_id, rec_chunk_ref, real_size)) = pipeline.next_result().await
{ {
chunk_file_map.insert_str(&job_id, (rec_chunk_ref, real_size)); chunk_file_map.insert(&job_id, (rec_chunk_ref, real_size));
Span::current().pb_inc(1); Span::current().pb_inc(1);
} }
// eprintln!("fin rec"); // eprintln!("fin rec");

View File

@ -157,7 +157,7 @@ pub fn scan(root: &Path, ignores: &Vec<String>) -> eyre::Result<PatriciaMap<Scan
) )
.with_context(|| format!("Failed to scan {:?}", rel_path))? .with_context(|| format!("Failed to scan {:?}", rel_path))?
{ {
entries.insert(rel_path, single_scan); entries.insert(&rel_path, single_scan);
} }
} }