about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-10-08 23:23:13 +0200
committerGitHub <noreply@github.com>2020-10-08 23:23:13 +0200
commit48c1ca15bb39ce63d468f286aa187833a72240ea (patch)
treeef127b9bace1a865d9c491edc75992826e370b55
parentb1e856ad43d9044349987dc692652f90ec075d7d (diff)
parentdd60ab3e2d5f2c650423f7d85b7cf5b4d8ce0a5c (diff)
downloadrust-48c1ca15bb39ce63d468f286aa187833a72240ea.tar.gz
rust-48c1ca15bb39ce63d468f286aa187833a72240ea.zip
Rollup merge of #77673 - heckad:patch-2, r=lcnr
Remove unnecessary lamda on emitter map.
-rw-r--r--compiler/rustc_driver/src/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index 3f50c68e3eb..066a61a7a7b 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -155,8 +155,7 @@ pub fn run_compiler(
             ),
         }
     }
-    let diagnostic_output =
-        emitter.map(|emitter| DiagnosticOutput::Raw(emitter)).unwrap_or(DiagnosticOutput::Default);
+    let diagnostic_output = emitter.map_or(DiagnosticOutput::Default, DiagnosticOutput::Raw);
     let matches = match handle_options(&args) {
         Some(matches) => matches,
         None => return Ok(()),