mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
fix failing text decoder test
This commit is contained in:
@@ -980,8 +980,7 @@ pub fn toUTF16Alloc(allocator: std.mem.Allocator, bytes: []const u8, comptime fa
|
||||
const offset = @truncate(u32, validated.count);
|
||||
|
||||
const trimmed = bun.simdutf.trim.utf8(bytes[offset..]);
|
||||
if (trimmed.len == 0 and offset == 0)
|
||||
return &[_]u16{};
|
||||
first_non_ascii = offset;
|
||||
|
||||
if (trimmed.len == 0)
|
||||
break :use_simdutf;
|
||||
|
||||
Reference in New Issue
Block a user