avoid a @ptrCast with an array literal

This commit is contained in:
Andrew Kelley 2020-02-18 16:48:26 -05:00
parent 3632f31ec2
commit a8d7652001
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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 {