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

@ -1310,10 +1310,10 @@ impl ConnectionPool {
return task.clone();
}
Some(ConnectionPoolEntry::Connected(ssh)) => {
if let Some(ssh) = ssh.upgrade() {
if !ssh.has_been_killed() {
return Task::ready(Ok(ssh)).shared();
}
if let Some(ssh) = ssh.upgrade()
&& !ssh.has_been_killed()
{
return Task::ready(Ok(ssh)).shared();
}
self.connections.remove(&opts);
}
@ -1840,26 +1840,25 @@ impl SshRemoteConnection {
)),
self.ssh_path_style,
);
if !self.socket.connection_options.upload_binary_over_ssh {
if let Some((url, body)) = delegate
if !self.socket.connection_options.upload_binary_over_ssh
&& let Some((url, body)) = delegate
.get_download_params(self.ssh_platform, release_channel, wanted_version, cx)
.await?
{
match self
.download_binary_on_server(&url, &body, &tmp_path_gz, delegate, cx)
.await
{
match self
.download_binary_on_server(&url, &body, &tmp_path_gz, delegate, cx)
.await
{
Ok(_) => {
self.extract_server_binary(&dst_path, &tmp_path_gz, delegate, cx)
.await?;
return Ok(dst_path);
}
Err(e) => {
log::error!(
"Failed to download binary on server, attempting to upload server: {}",
e
)
}
Ok(_) => {
self.extract_server_binary(&dst_path, &tmp_path_gz, delegate, cx)
.await?;
return Ok(dst_path);
}
Err(e) => {
log::error!(
"Failed to download binary on server, attempting to upload server: {}",
e
)
}
}
}