diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-26 13:57:08 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-04-28 13:24:43 -0700 |
| commit | 6261c1373168b265047db5704d9d0fd5f2e458f2 (patch) | |
| tree | 18d6f31107b2c42ac9c6567b42f577bca41d769b /lib/std/json.zig | |
| parent | 57ea6207d3cb2db706bdc06c14605e4b901736dd (diff) | |
| download | zig-6261c1373168b265047db5704d9d0fd5f2e458f2.tar.gz zig-6261c1373168b265047db5704d9d0fd5f2e458f2.zip | |
update codebase to use `@memset` and `@memcpy`
Diffstat (limited to 'lib/std/json.zig')
| -rw-r--r-- | lib/std/json.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/json.zig b/lib/std/json.zig index ca7fb5ad20..432f4e6911 100644 --- a/lib/std/json.zig +++ b/lib/std/json.zig @@ -1667,7 +1667,7 @@ fn parseInternal( const source_slice = stringToken.slice(tokens.slice, tokens.i - 1); if (r.len != stringToken.decodedLength()) return error.LengthMismatch; switch (stringToken.escapes) { - .None => mem.copy(u8, &r, source_slice), + .None => @memcpy(r[0..source_slice.len], source_slice), .Some => try unescapeValidString(&r, source_slice), } return r; @@ -1733,7 +1733,7 @@ fn parseInternal( try allocator.alloc(u8, len); errdefer allocator.free(output); switch (stringToken.escapes) { - .None => mem.copy(u8, output, source_slice), + .None => @memcpy(output[0..source_slice.len], source_slice), .Some => try unescapeValidString(output, source_slice), } |
