Rollup merge of #130235 - compiler-errors:nested-if, r=michaelwoerister

Simplify some nested `if` statements

Applies some but not all instances of `clippy::collapsible_if`. Some ended up looking worse afterwards, though, so I left those out. Also applies instances of `clippy::collapsible_else_if`

Review with whitespace disabled please.
This commit is contained in:
Stuart Cook 2024-09-12 20:37:16 +10:00 committed by GitHub
commit 3ba12756d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 563 additions and 671 deletions

View file

@ -791,14 +791,12 @@ impl<'a> Linker for GccLinker<'a> {
self.link_arg("-exported_symbols_list").link_arg(path);
} else if self.sess.target.is_like_solaris {
self.link_arg("-M").link_arg(path);
} else if is_windows {
self.link_arg(path);
} else {
if is_windows {
self.link_arg(path);
} else {
let mut arg = OsString::from("--version-script=");
arg.push(path);
self.link_arg(arg).link_arg("--no-undefined-version");
}
let mut arg = OsString::from("--version-script=");
arg.push(path);
self.link_arg(arg).link_arg("--no-undefined-version");
}
}