diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-30 00:13:07 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-30 00:13:07 -0700 |
| commit | 902df103c6151c257c90de9ba5f29f7f4b9dbea2 (patch) | |
| tree | 16a522f3c8bbe34b56038d4810bf2487e32e2d85 /src/value.zig | |
| parent | 173d56213b60fc570b6ba3922ee1d40bbf0d0e36 (diff) | |
| download | zig-902df103c6151c257c90de9ba5f29f7f4b9dbea2.tar.gz zig-902df103c6151c257c90de9ba5f29f7f4b9dbea2.zip | |
std lib API deprecations for the upcoming 0.9.0 release
See #3811
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/value.zig b/src/value.zig index cc030faaae..1f08a8e336 100644 --- a/src/value.zig +++ b/src/value.zig @@ -753,9 +753,9 @@ pub const Value = extern union { const bytes = val.castTag(.bytes).?.data; const adjusted_len = bytes.len - @boolToInt(ty.sentinel() != null); const adjusted_bytes = bytes[0..adjusted_len]; - return std.mem.dupe(allocator, u8, adjusted_bytes); + return allocator.dupe(u8, adjusted_bytes); }, - .enum_literal => return std.mem.dupe(allocator, u8, val.castTag(.enum_literal).?.data), + .enum_literal => return allocator.dupe(u8, val.castTag(.enum_literal).?.data), .repeated => @panic("TODO implement toAllocatedBytes for this Value tag"), .decl_ref => { const decl = val.castTag(.decl_ref).?.data; |
