Skip to content

Commit

Permalink
update bench to latest zig API
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jan 6, 2024
1 parent 940c66d commit ba8986b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bench/ping-pongs.zig
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ const Server = struct {
// Echo it back
const c_echo = self.completion_pool.create() catch unreachable;
const buf_write = self.buffer_pool.create() catch unreachable;
std.mem.copy(u8, buf_write, buf.slice[0..n]);
@memcpy(buf_write, buf.slice[0..n]);
socket.write(loop, c_echo, .{ .slice = buf_write[0..n] }, Server, self, writeCallback);

// Read again
Expand Down

0 comments on commit ba8986b

Please sign in to comment.