Skip to content

Commit

Permalink
de: std.mem.copy is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
ibokuri committed Dec 3, 2023
1 parent 45c31ac commit e42ee6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/de/impls/visitor/content.zig
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn visitString(
},
.stack, .managed => {
const copy = try ally.alloc(u8, input.len);
std.mem.copy(u8, copy, input);
std.mem.copyForwards(u8, copy, input);
return .{ .value = .{ .String = copy }, .used = false };
},
}
Expand Down
2 changes: 1 addition & 1 deletion src/de/impls/visitor/slice.zig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn Visitor(comptime Slice: type) type {
}

const output = try ally.alloc(u8, input.len + @intFromBool(v_info.sentinel != null));
std.mem.copy(u8, output, input);
std.mem.copyForwards(u8, output, input);

if (v_info.sentinel) |s| {
const sentinel_char = @as(*const u8, @ptrCast(s)).*;
Expand Down

0 comments on commit e42ee6e

Please sign in to comment.