aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/uuid.zig
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-02-23 23:57:19 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-23 23:57:19 -0800
commit3f04f8d0a653cf5decef2225c2044742b382718a (patch)
tree91eb6500834e3157ecb9ab208101aa368a1191c8 /src/bun.js/uuid.zig
parentb5bdde28ed34070cbb1d34d13f414f4c513ee40d (diff)
downloadbun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.gz
bun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.zst
bun-3f04f8d0a653cf5decef2225c2044742b382718a.zip
Upgrade Zig (#2151)
* fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig
Diffstat (limited to '')
-rw-r--r--src/bun.js/uuid.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/uuid.zig b/src/bun.js/uuid.zig
index affd07a32..f172c6225 100644
--- a/src/bun.js/uuid.zig
+++ b/src/bun.js/uuid.zig
@@ -87,7 +87,7 @@ pub fn print(
buf[13] = '-';
buf[18] = '-';
buf[23] = '-';
- inline for (encoded_pos) |i, j| {
+ inline for (encoded_pos, 0..) |i, j| {
buf[comptime i + 0] = hex[bytes[j] >> 4];
buf[comptime i + 1] = hex[bytes[j] & 0x0f];
}
@@ -99,7 +99,7 @@ pub fn parse(buf: []const u8) Error!UUID {
if (buf.len != 36 or buf[8] != '-' or buf[13] != '-' or buf[18] != '-' or buf[23] != '-')
return Error.InvalidUUID;
- inline for (encoded_pos) |i, j| {
+ inline for (encoded_pos, 0..) |i, j| {
const hi = hex_to_nibble[buf[i + 0]];
const lo = hex_to_nibble[buf[i + 1]];
if (hi == 0xff or lo == 0xff) {