Fix clippy::manual_map
lint violations (#36584)
#36577 Release Notes: - N/A
This commit is contained in:
parent
de12633591
commit
bc79076ad3
18 changed files with 62 additions and 118 deletions
|
@ -3895,14 +3895,12 @@ impl ProjectPanel {
|
|||
// Always highlight directory or parent directory if it's file
|
||||
if target_entry.is_dir() {
|
||||
Some(target_entry.id)
|
||||
} else if let Some(parent_entry) = target_entry
|
||||
.path
|
||||
.parent()
|
||||
.and_then(|parent_path| target_worktree.entry_for_path(parent_path))
|
||||
{
|
||||
Some(parent_entry.id)
|
||||
} else {
|
||||
None
|
||||
target_entry
|
||||
.path
|
||||
.parent()
|
||||
.and_then(|parent_path| target_worktree.entry_for_path(parent_path))
|
||||
.map(|parent_entry| parent_entry.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3939,12 +3937,10 @@ impl ProjectPanel {
|
|||
// Always highlight directory or parent directory if it's file
|
||||
if target_entry.is_dir() {
|
||||
Some(target_entry.id)
|
||||
} else if let Some(parent_entry) =
|
||||
target_parent_path.and_then(|parent_path| target_worktree.entry_for_path(parent_path))
|
||||
{
|
||||
Some(parent_entry.id)
|
||||
} else {
|
||||
None
|
||||
target_parent_path
|
||||
.and_then(|parent_path| target_worktree.entry_for_path(parent_path))
|
||||
.map(|parent_entry| parent_entry.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue