mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-10 05:37:29 +03:00
Remove unnescessary double lookup
This commit is contained in:
parent
3984cc6d39
commit
6792788216
@ -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…
Reference in New Issue
Block a user