From 141544a903d4eb049d0611cbe6c7d248d3f5d425 Mon Sep 17 00:00:00 2001 From: Kazantcev Andrey <45011689+heckad@users.noreply.github.com> Date: Thu, 8 Oct 2020 00:29:20 +0300 Subject: [PATCH] Remove unnecessary lamda on emitter map. --- compiler/rustc_driver/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 3f50c68e3ebf5..e89fcc920a093 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(DiagnosticOutput::Raw).unwrap_or(DiagnosticOutput::Default); let matches = match handle_options(&args) { Some(matches) => matches, None => return Ok(()),