Auto-fix clippy::collapsible_if violations (#36428)
Release Notes: - N/A
This commit is contained in:
@@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user