From 19e21cda908d364332cb9264aa9d237227849c98 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Tue, 2 Jan 2024 00:06:05 +0900 Subject: [PATCH] Fix dir-diff paths merging to not add duplicated entries from remainder If lhs_paths and rhs_paths are ["a", "c"] and ["a", "b", "c"] respectively, the loop ends with paths = ["a", "c", "b"], i = j = 2. We still need to deduplicate "c" from the rhs_paths. .into_iter() can't be used anymore since the seen set still borrows the paths. --- src/files.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/files.rs b/src/files.rs index 5dd3d38b59..9ff1d79632 100644 --- a/src/files.rs +++ b/src/files.rs @@ -291,8 +291,18 @@ pub(crate) fn relative_paths_in_either(lhs_dir: &Path, rhs_dir: &Path) -> Vec