Merge HumanEmitter::{new,create}.
They have the same signature, and the former just calls the latter.
This commit is contained in:
parent
880c1c585f
commit
d3727413ed
1 changed files with 2 additions and 7 deletions
|
@ -665,11 +665,10 @@ pub(crate) struct FileWithAnnotatedLines {
|
||||||
|
|
||||||
impl HumanEmitter {
|
impl HumanEmitter {
|
||||||
pub fn stderr(color_config: ColorConfig, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
|
pub fn stderr(color_config: ColorConfig, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
|
||||||
let dst = from_stderr(color_config);
|
Self::new(from_stderr(color_config), fallback_bundle)
|
||||||
Self::create(dst, fallback_bundle)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
|
pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
|
||||||
HumanEmitter {
|
HumanEmitter {
|
||||||
dst: IntoDynSyncSend(dst),
|
dst: IntoDynSyncSend(dst),
|
||||||
sm: None,
|
sm: None,
|
||||||
|
@ -686,10 +685,6 @@ impl HumanEmitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
|
|
||||||
Self::create(dst, fallback_bundle)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn maybe_anonymized(&self, line_num: usize) -> Cow<'static, str> {
|
fn maybe_anonymized(&self, line_num: usize) -> Cow<'static, str> {
|
||||||
if self.ui_testing {
|
if self.ui_testing {
|
||||||
Cow::Borrowed(ANONYMIZED_LINE_NUM)
|
Cow::Borrowed(ANONYMIZED_LINE_NUM)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue