Skip to content

Commit 3c3f15c

Browse files
committed
Use Destination more.
1 parent 869bd03 commit 3c3f15c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

compiler/rustc_errors/src/emitter.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl HumanReadableErrorType {
6060
}
6161
pub fn new_emitter(
6262
self,
63-
mut dst: Box<dyn WriteColor + Send>,
63+
mut dst: Destination,
6464
fallback_bundle: LazyFallbackBundle,
6565
) -> HumanEmitter {
6666
let (short, color_config) = self.unzip();
@@ -686,10 +686,7 @@ impl HumanEmitter {
686686
}
687687
}
688688

689-
pub fn new(
690-
dst: Box<dyn WriteColor + Send>,
691-
fallback_bundle: LazyFallbackBundle,
692-
) -> HumanEmitter {
689+
pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
693690
Self::create(dst, fallback_bundle)
694691
}
695692

@@ -2634,7 +2631,7 @@ fn emit_to_destination(
26342631
Ok(())
26352632
}
26362633

2637-
pub type Destination = Box<(dyn WriteColor + Send)>;
2634+
pub type Destination = Box<dyn WriteColor + Send>;
26382635

26392636
struct Buffy {
26402637
buffer_writer: BufferWriter,

0 commit comments

Comments
 (0)