Skip to content

Commit 48c1ca1

Browse files
Rollup merge of #77673 - heckad:patch-2, r=lcnr
Remove unnecessary lamda on emitter map.
2 parents b1e856a + dd60ab3 commit 48c1ca1

File tree

1 file changed

+1
-2
lines changed
  • compiler/rustc_driver/src

1 file changed

+1
-2
lines changed

compiler/rustc_driver/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ pub fn run_compiler(
155155
),
156156
}
157157
}
158-
let diagnostic_output =
159-
emitter.map(|emitter| DiagnosticOutput::Raw(emitter)).unwrap_or(DiagnosticOutput::Default);
158+
let diagnostic_output = emitter.map_or(DiagnosticOutput::Default, DiagnosticOutput::Raw);
160159
let matches = match handle_options(&args) {
161160
Some(matches) => matches,
162161
None => return Ok(()),

0 commit comments

Comments
 (0)