mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std.net.Ip6Address: format numerical scope id
This commit is contained in:
parent
32a1aabff7
commit
377a8b2a3b
@ -747,6 +747,9 @@ pub const Ip6Address = extern struct {
|
|||||||
try w.writeAll(":");
|
try w.writeAll(":");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (self.sa.scope_id != 0) {
|
||||||
|
try w.print("%{}", .{self.sa.scope_id});
|
||||||
|
}
|
||||||
try w.print("]:{}", .{port});
|
try w.print("]:{}", .{port});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ test "parse and render IPv6 addresses" {
|
|||||||
"2001:db8::",
|
"2001:db8::",
|
||||||
"::1234:5678",
|
"::1234:5678",
|
||||||
"2001:db8::1234:5678",
|
"2001:db8::1234:5678",
|
||||||
"ff01::fb",
|
"ff01::fb%1234",
|
||||||
"::ffff:123.5.123.5",
|
"::ffff:123.5.123.5",
|
||||||
};
|
};
|
||||||
for (ips, 0..) |ip, i| {
|
for (ips, 0..) |ip, i| {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user