Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
Use std.mem.span as spanZ is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
fifty-six committed Aug 3, 2021
1 parent 2ca2569 commit 089634a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn caught_main() !void {
const bytes = @ptrCast([*:0]const u8, &str_addr);

// As an actual slice
const slice: []const u8 = std.mem.spanZ(bytes);
const slice: []const u8 = std.mem.span(bytes);

// Insert push before address
const clone = try allocator.alloc(u8, slice.len + 1);
Expand Down

0 comments on commit 089634a

Please sign in to comment.