use AllocError;
// upstream 066ae19465 — the `HandleOom` trait was ceremony: only the
// `Result<T, AllocError>` arm ever had callers (js_parser scan_imports), so it
// collapses to a plain function.
/// Unwraps a `Result<T, AllocError>`, converting OOM into the controlled
/// `bun.outOfMemory` crash.
// ported from: src/crash_handler/handle_oom.zig