fixing slow memory leak
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
pub fn writePacked(comptime T: type, bytes: []u8, value: T) void {
|
||||
const raw: [@sizeOf(T)]u8 = @bitCast(value);
|
||||
@memcpy(bytes[0..@sizeOf(T)], raw[0..]);
|
||||
}
|
||||
Reference in New Issue
Block a user