diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-22 15:48:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-22 15:48:41 +0100 |
| commit | 8fe8bad96b88cf981458e836e6866ddc7966cecb (patch) | |
| tree | 8b6472e894c409e9d728067bbcf2673d406e2fb2 /src/librustc_codegen_ssa | |
| parent | e5d34766510fd61b07012103bf6e7b83f963a33f (diff) | |
| parent | 74d68ea7ebe2085bba2758ccce366f1fa4fc6210 (diff) | |
| download | rust-8fe8bad96b88cf981458e836e6866ddc7966cecb.tar.gz rust-8fe8bad96b88cf981458e836e6866ddc7966cecb.zip | |
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)
Diffstat (limited to 'src/librustc_codegen_ssa')
| -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 { |
