Remove unnescessary double lookup
This commit is contained in:
parent
3984cc6d39
commit
6792788216
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ impl Snapshot {
|
|||
let mut max_len = 0;
|
||||
let mut current_candidate = None;
|
||||
for (work_directory, repo) in (&self.repository_entries).iter() {
|
||||
if repo.contains(self, path) {
|
||||
if path.starts_with(&work_directory.0) {
|
||||
if work_directory.0.as_os_str().len() >= max_len {
|
||||
current_candidate = Some(repo);
|
||||
max_len = work_directory.0.as_os_str().len();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue