mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
std: use mem.asBytes in Ip4Address.parse so it works at comptime
This commit is contained in:
parent
83abb32247
commit
b7b3c1dfae
@ -196,7 +196,7 @@ pub const Ip4Address = extern struct {
|
||||
.addr = undefined,
|
||||
},
|
||||
};
|
||||
const out_ptr = mem.sliceAsBytes(@as(*[1]u32, &result.sa.addr)[0..]);
|
||||
const out_ptr = mem.asBytes(&result.sa.addr);
|
||||
|
||||
var x: u8 = 0;
|
||||
var index: u8 = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user