Skip to content

Commit 9d5d270

Browse files
committed
don't need this loop at all
1 parent 23291c1 commit 9d5d270

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/bun.js/test/pretty_format.zig

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ pub const JestPrettyFormat = struct {
818818
.{key},
819819
);
820820
} else if (key.is16Bit()) {
821-
var utf16Slice = key.utf16SliceAligned();
821+
const utf16Slice = key.utf16SliceAligned();
822822

823823
this.addForNewLine(utf16Slice.len + 2);
824824

@@ -827,15 +827,7 @@ pub const JestPrettyFormat = struct {
827827
}
828828

829829
writer.writeAll("\"");
830-
831-
while (strings.indexOfAny16(utf16Slice, "\"")) |j| {
832-
writer.write16Bit(utf16Slice[0..j]);
833-
writer.writeAll("\"");
834-
utf16Slice = utf16Slice[j + 1 ..];
835-
}
836-
837830
writer.write16Bit(utf16Slice);
838-
839831
writer.print(
840832
comptime Output.prettyFmt("\"<r><d>:<r> ", enable_ansi_colors),
841833
.{},

0 commit comments

Comments
 (0)