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
4 changes: 2 additions & 2 deletions clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ disallowed-methods = [
{ 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" },
{ path = "alloc::string::String::from_utf8_lossy", reason = "silently corrupts non-UTF-8 bytes and allocates; keep data as bytes (bstr::BStr for Display)" },
{ path = "alloc::string::String::from_utf8", reason = "keep data as bytes; in a diagnostic format the bytes with bstr::BStr (its Display writes U+FFFD for invalid UTF-8), for JS-visible strings use bun_core::String::clone_utf8, everywhere else (child process output, a path to open or to print for another program, hash input) use the sink's byte API (Vec::extend_from_slice, write_all, bun_core::output::print_bytes for stdout, bun_core::strings::concat_buf_t for a fixed buffer)" },
{ path = "alloc::string::String::from_utf8_lossy", reason = "silently corrupts non-UTF-8 bytes, and allocates to do it; keep data as bytes: in a diagnostic format the bytes with bstr::BStr (its Display writes the same U+FFFD, without the allocation), everywhere else (child process output, a path to open or to print for another program, hash input) use the sink's byte API (Vec::extend_from_slice, write_all, bun_core::output::print_bytes for stdout, bun_core::strings::concat_buf_t for a fixed buffer)" },
# == byte/substring search must go through bun_core::strings (highway, runtime-dispatched SIMD) ==
# libcore's searchers are scalar or compile-time-gated SSE2/NEON (we build with
# -Ctarget-cpu=nehalem on x64); highway picks AVX2/AVX-512 at runtime. The
Expand Down
4 changes: 1 addition & 3 deletions src/runtime/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,7 @@ pub(crate) mod help_command {
let package_remove_i = pick(PACKAGES_TO_REMOVE_FILLER.len());
let package_create_i = pick(PACKAGES_TO_CREATE_FILLER.len());

// The filler tables are `&str` (not `&[u8]`) so the `{:<16}`
// width spec actually pads — `Display for BStr` writes raw bytes and
// ignores formatter width/alignment.
// The filler tables are `&str` (not `&[u8]`) so the `{:<16}` width spec pads.
let args = (
PACKAGES_TO_X_FILLER[package_x_i],
PACKAGES_TO_ADD_FILLER[package_add_i],
Expand Down
Loading