Rollup merge of #77673 - heckad:patch-2, r=lcnr

Remove unnecessary lamda on emitter map.
This commit is contained in:
Jonas Schievink 2020-10-08 23:23:13 +02:00 committed by GitHub
commit 48c1ca15bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(()),