Skip to content

Commit

Permalink
Rollup merge of rust-lang#77673 - heckad:patch-2, r=lcnr
Browse files Browse the repository at this point in the history
Remove unnecessary lamda on emitter map.
  • Loading branch information
Dylan-DPC authored Oct 8, 2020
2 parents 45a34fc + dd60ab3 commit 516212e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(()),
Expand Down

0 comments on commit 516212e

Please sign in to comment.