Inline a function that is only used once
This commit is contained in:
parent
8d60f7573d
commit
b7f8eba9fd
1 changed files with 4 additions and 20 deletions
|
@ -553,29 +553,13 @@ impl Handler {
|
||||||
sm: Option<Lrc<SourceMap>>,
|
sm: Option<Lrc<SourceMap>>,
|
||||||
fallback_bundle: LazyFallbackBundle,
|
fallback_bundle: LazyFallbackBundle,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self::with_tty_emitter_and_flags(
|
let flags =
|
||||||
|
HandlerFlags { can_emit_warnings, treat_err_as_bug: None, ..Default::default() };
|
||||||
|
let emitter = Box::new(EmitterWriter::stderr(
|
||||||
ColorConfig::Auto,
|
ColorConfig::Auto,
|
||||||
sm,
|
sm,
|
||||||
None,
|
None,
|
||||||
fallback_bundle,
|
fallback_bundle,
|
||||||
HandlerFlags { can_emit_warnings, treat_err_as_bug: None, ..Default::default() },
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn with_tty_emitter_and_flags(
|
|
||||||
color_config: ColorConfig,
|
|
||||||
sm: Option<Lrc<SourceMap>>,
|
|
||||||
fluent_bundle: Option<Lrc<FluentBundle>>,
|
|
||||||
fallback_bundle: LazyFallbackBundle,
|
|
||||||
flags: HandlerFlags,
|
|
||||||
ice_file: Option<PathBuf>,
|
|
||||||
) -> Self {
|
|
||||||
let emitter = Box::new(EmitterWriter::stderr(
|
|
||||||
color_config,
|
|
||||||
sm,
|
|
||||||
fluent_bundle,
|
|
||||||
fallback_bundle,
|
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
None,
|
None,
|
||||||
|
@ -583,7 +567,7 @@ impl Handler {
|
||||||
flags.track_diagnostics,
|
flags.track_diagnostics,
|
||||||
TerminalUrl::No,
|
TerminalUrl::No,
|
||||||
));
|
));
|
||||||
Self::with_emitter_and_flags(emitter, flags, ice_file)
|
Self::with_emitter_and_flags(emitter, flags, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_emitter(
|
pub fn with_emitter(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue