Refactor syncback instance processing for improved efficiency

- Consolidated repetitive calls to `syncback_instance_to_path_with_stats` into a new method `process_children_incremental` for better code organization and readability.
- Streamlined the handling of sibling slug computation by removing redundant logic, enhancing maintainability in `api.rs`.
- Updated function signatures to reflect changes in return types and improve clarity in the syncback process.
This commit is contained in:
Joe 2026-02-10 03:46:08 -06:00
parent 7a090b104f
commit cc2eb2b66d
2 changed files with 33 additions and 103 deletions

View file

@ -688,9 +688,7 @@ pub fn syncback_project<'sync>(
// concern with directories because they're singular things,
// files that contain their own children.
if parent_middleware != Middleware::Project {
let taken_names = taken_names_per_dir
.entry(parent_path.clone())
.or_default();
let taken_names = taken_names_per_dir.entry(parent_path.clone()).or_default();
let (child_snap, _needs_meta, dedup_key) = snapshot.with_base_path(
&parent_path,
new_child.referent(),