Avoid use of PatriciaMap.insert_str to avoid causing bug
This commit is contained in:
parent
5ffbf4fc1c
commit
1bd46b934d
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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");
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user