Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ disallowed-methods = [
{ path = "bun_core::output::pretty_fmt_runtime", reason = "const format strings must use pretty_fmt!/write_pretty! (compile-time rewrite); the runtime walk is only for templates built at runtime — allow with justification" },
{ path = "bun_core::output::pretty", reason = "renders args then tag-walks the rendered bytes (allocates twice, mangles user-controlled '<'); use the pretty! macro — allow only for runtime-built payloads, with justification" },
{ path = "bun_core::output::prettyln", reason = "renders args then tag-walks the rendered bytes; use the prettyln! macro — allow only for runtime-built payloads, with justification" },
{ path = "bun_core::output::pretty_errorln", reason = "renders args then tag-walks the rendered bytes; use the pretty_errorln! macro — allow only for runtime-built payloads, with justification" },
{ path = "bun_core::output::warn", reason = "renders args then tag-walks the rendered bytes; use the warn! macro — allow only for runtime-built payloads, with justification" },
{ path = "bun_core::output::debug_warn", reason = "renders args then tag-walks the rendered bytes; use the debug_warn! macro — allow only for runtime-built payloads, with justification" },
{ path = "alloc::string::String::from_utf8", reason = "keep data as bytes; for display use bstr::BStr, for JS-visible strings use bun_core::String::clone_utf8" },
Expand Down
13 changes: 0 additions & 13 deletions src/bun_core/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,6 @@ pub fn warn(payload: impl PrettyFmtInput) {
flush();
}

/// `Output.prettyErrorln` — function form. Performs `<tag>` → ANSI rewrite on
/// the rendered payload (using stderr's colour state), writes to stderr, and
/// appends `\n` if the rendered output does not already end in one. Macro
/// form: `crate::pretty_errorln!`.
#[inline]
pub fn pretty_errorln(payload: impl PrettyFmtInput) {
let buf = payload.into_pretty_buf(enable_ansi_colors_stderr());
write_bytes(Destination::Stderr, &buf);
if buf.0.last() != Some(&b'\n') {
write_bytes(Destination::Stderr, b"\n");
}
}

/// `bun.Output.Source.Stdio.restore` — restore terminal to cooked mode on exit.
/// Thin alias over [`crate::output::stdio::restore`] (the real impl, also in
/// this crate).
Expand Down
Loading