From std.mem.set to @memset.
This commit is contained in:
parent
9d4f5b3cab
commit
a43c8bd6d3
@ -6,7 +6,7 @@ pub fn hexdump(stream: anytype, header: []const u8, buffer: []const u8) std.os.W
|
|||||||
var hdr: [64]u8 = undefined;
|
var hdr: [64]u8 = undefined;
|
||||||
var offset: usize = (hdr.len / 2) - ((header.len / 2) - 1);
|
var offset: usize = (hdr.len / 2) - ((header.len / 2) - 1);
|
||||||
|
|
||||||
std.mem.set(u8, hdr[0..hdr.len], ' ');
|
@memset(hdr[0..hdr.len], ' ');
|
||||||
std.mem.copy(u8, hdr[offset..hdr.len], header);
|
std.mem.copy(u8, hdr[offset..hdr.len], header);
|
||||||
|
|
||||||
try stream.writeAll(hdr[0..hdr.len]);
|
try stream.writeAll(hdr[0..hdr.len]);
|
||||||
|
Loading…
Reference in New Issue
Block a user