From 902df103c6151c257c90de9ba5f29f7f4b9dbea2 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 30 Nov 2021 00:13:07 -0700 Subject: std lib API deprecations for the upcoming 0.9.0 release See #3811 --- src/value.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/value.zig') 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; -- cgit v1.2.3