Avoid a bit more allocation and make intentions clearer.

This commit is contained in:
r-vdp 2023-05-29 01:22:07 +02:00
parent f584494464
commit 79eecb6251
No known key found for this signature in database
3 changed files with 7 additions and 6 deletions

View file

@ -116,7 +116,7 @@ impl FileTree {
Some(go(
maybe_subtree.unwrap_or_else(|| {
FileTree::with_status(
new_path.to_owned(),
new_path.clone(),
// We only label as managed the final path entry,
// to label intermediate nodes as managed, we should
// call this function for every one of them separately.