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

@ -267,13 +267,13 @@ impl RateCompletionModal {
.unwrap_or(self.selected_index);
cx.notify();
if let Some(prev_completion) = self.active_completion.as_ref() {
if completion.id == prev_completion.completion.id {
if focus {
window.focus(&prev_completion.feedback_editor.focus_handle(cx));
}
return;
if let Some(prev_completion) = self.active_completion.as_ref()
&& completion.id == prev_completion.completion.id
{
if focus {
window.focus(&prev_completion.feedback_editor.focus_handle(cx));
}
return;
}
}

View file

@ -836,12 +836,11 @@ and then another
.headers()
.get(MINIMUM_REQUIRED_VERSION_HEADER_NAME)
.and_then(|version| SemanticVersion::from_str(version.to_str().ok()?).ok())
&& app_version < minimum_required_version
{
if app_version < minimum_required_version {
return Err(anyhow!(ZedUpdateRequiredError {
minimum_version: minimum_required_version
}));
}
return Err(anyhow!(ZedUpdateRequiredError {
minimum_version: minimum_required_version
}));
}
if response.status().is_success() {