diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-22 00:20:58 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-22 00:35:25 +0100 |
| commit | 74d68ea7ebe2085bba2758ccce366f1fa4fc6210 (patch) | |
| tree | 164b41576142a0d0476b1ec3c8c325abe260c03f /src/librustc_codegen_ssa/back | |
| parent | 3599fd389de25af78a4616015fa937ff3aeb661a (diff) | |
| download | rust-74d68ea7ebe2085bba2758ccce366f1fa4fc6210.tar.gz rust-74d68ea7ebe2085bba2758ccce366f1fa4fc6210.zip | |
don't create variable bindings just to return the bound value immediately (clippy::let_and_return)
Diffstat (limited to 'src/librustc_codegen_ssa/back')
| -rw-r--r-- | src/librustc_codegen_ssa/back/rpath.rs | 4 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/back/write.rs | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/librustc_codegen_ssa/back/rpath.rs b/src/librustc_codegen_ssa/back/rpath.rs index 9d19cc25a32..0a0e975e5a5 100644 --- a/src/librustc_codegen_ssa/back/rpath.rs +++ b/src/librustc_codegen_ssa/back/rpath.rs @@ -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> { diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs index 303ee385658..746ab34d284 100644 --- a/src/librustc_codegen_ssa/back/write.rs +++ b/src/librustc_codegen_ssa/back/write.rs @@ -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 { |
