Rollup merge of #70254 - matthiaskrgr:cl4ppy, r=Centril

couple more clippy fixes (let_and_return, if_same_then_else)

* summarize if-else-code with identical blocks (clippy::if_same_then_else)
* don't create variable bindings just to return the bound value immediately (clippy::let_and_return)
This commit is contained in:
Dylan DPC 2020-03-22 15:48:41 +01:00 committed by GitHub
commit 8fe8bad96b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 34 additions and 67 deletions

View file

@ -81,9 +81,7 @@ fn get_rpaths(config: &mut RPathConfig<'_>, libs: &[PathBuf]) -> Vec<String> {
rpaths.extend_from_slice(&fallback_rpaths);
// Remove duplicates
let rpaths = minimize_rpaths(&rpaths);
rpaths
minimize_rpaths(&rpaths)
}
fn get_rpaths_relative_to_output(config: &mut RPathConfig<'_>, libs: &[PathBuf]) -> Vec<String> {

View file

@ -288,7 +288,7 @@ fn generate_lto_work<B: ExtraBackendMethods>(
B::run_thin_lto(cgcx, needs_thin_lto, import_only_modules).unwrap_or_else(|e| e.raise())
};
let result = lto_modules
lto_modules
.into_iter()
.map(|module| {
let cost = module.cost();
@ -303,9 +303,7 @@ fn generate_lto_work<B: ExtraBackendMethods>(
0,
)
}))
.collect();
result
.collect()
}
pub struct CompiledModules {