Skip to content

Commit 0b83e92

Browse files
committed
refactor(config): Clarify duplicate-load check
1 parent d5cb6b5 commit 0b83e92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cargo/util/context/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,20 +1581,20 @@ impl GlobalContext {
15811581
where
15821582
F: FnMut(&Path) -> CargoResult<()>,
15831583
{
1584-
let mut stash: HashSet<PathBuf> = HashSet::new();
1584+
let mut seen = HashSet::new();
15851585

15861586
for current in paths::ancestors(pwd, self.search_stop_path.as_deref()) {
15871587
if let Some(path) = self.get_file_path(&current.join(".cargo"), "config", true)? {
15881588
walk(&path)?;
1589-
stash.insert(path);
1589+
seen.insert(path);
15901590
}
15911591
}
15921592

15931593
// Once we're done, also be sure to walk the home directory even if it's not
15941594
// in our history to be sure we pick up that standard location for
15951595
// information.
15961596
if let Some(path) = self.get_file_path(home, "config", true)? {
1597-
if !stash.contains(&path) {
1597+
if !seen.contains(&path) {
15981598
walk(&path)?;
15991599
}
16001600
}

0 commit comments

Comments
 (0)