don't create variable bindings just to return the bound value immediately (clippy::let_and_return)

This commit is contained in:
Matthias Krüger 2020-03-22 00:20:58 +01:00
parent 3599fd389d
commit 74d68ea7eb
15 changed files with 33 additions and 60 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 {