Auto-fix clippy::collapsible_if violations (#36428)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 15:27:24 +02:00 committed by GitHub
parent 9e8ec72bd5
commit 8f567383e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
281 changed files with 6628 additions and 7089 deletions

View file

@ -255,8 +255,7 @@ impl TerminalPanel {
.transpose()
.log_err()
.flatten()
{
if let Ok(serialized) = workspace
&& let Ok(serialized) = workspace
.update_in(&mut cx, |workspace, window, cx| {
deserialize_terminal_panel(
workspace.weak_handle(),
@ -268,9 +267,8 @@ impl TerminalPanel {
)
})?
.await
{
terminal_panel = Some(serialized);
}
{
terminal_panel = Some(serialized);
}
}
_ => {}
@ -1077,11 +1075,10 @@ pub fn new_terminal_pane(
return ControlFlow::Break(());
}
};
} else if let Some(project_path) = item.project_path(cx) {
if let Some(entry_path) = project.read(cx).absolute_path(&project_path, cx)
{
add_paths_to_terminal(pane, &[entry_path], window, cx);
}
} else if let Some(project_path) = item.project_path(cx)
&& let Some(entry_path) = project.read(cx).absolute_path(&project_path, cx)
{
add_paths_to_terminal(pane, &[entry_path], window, cx);
}
}
} else if let Some(selection) = dropped_item.downcast_ref::<DraggedSelection>() {
@ -1103,10 +1100,8 @@ pub fn new_terminal_pane(
{
add_paths_to_terminal(pane, &[entry_path], window, cx);
}
} else if is_local {
if let Some(paths) = dropped_item.downcast_ref::<ExternalPaths>() {
add_paths_to_terminal(pane, paths.paths(), window, cx);
}
} else if is_local && let Some(paths) = dropped_item.downcast_ref::<ExternalPaths>() {
add_paths_to_terminal(pane, paths.paths(), window, cx);
}
ControlFlow::Break(())