- false, // no teach messages when writing to a buffer
- false, // no colors when writing to a buffer
- ),
- };
- Box::new(emitter.ui_testing(sopts.debugging_opts.ui_testing))
+ );
+ Box::new(emitter.ui_testing(sopts.debugging_opts.ui_testing))
+ } else {
+ let emitter = match dst {
+ None => EmitterWriter::stderr(
+ color_config,
+ Some(source_map.clone()),
+ short,
+ sopts.debugging_opts.teach,
+ ),
+ Some(dst) => EmitterWriter::new(
+ dst,
+ Some(source_map.clone()),
+ short,
+ false, // no teach messages when writing to a buffer
+ false, // no colors when writing to a buffer
+ ),
+ };
+ Box::new(emitter.ui_testing(sopts.debugging_opts.ui_testing))
+ }