mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
avoid a @ptrCast with an array literal
This commit is contained in:
parent
3632f31ec2
commit
a8d7652001
@ -239,7 +239,7 @@ pub fn PeekStream(comptime buffer_type: std.fifo.LinearFifoBufferType, comptime
|
||||
};
|
||||
|
||||
pub fn putBackByte(self: *Self, byte: u8) !void {
|
||||
try self.putBack(@ptrCast([*]const u8, &byte)[0..1]);
|
||||
try self.putBack(&[_]u8{byte});
|
||||
}
|
||||
|
||||
pub fn putBack(self: *Self, bytes: []const u8) !void {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user