authorgravatar for free122448@hotmail.comdatabase64128 <free122448@hotmail.com> 2025-08-25 16:02:24+08:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-15 10:45:35+01:00
log377a8b2a3b408dad4392a97254a7a6bb2d06b200
tree65f1d30d417a909edcb8f7cf3fadd617e3732550
parent32a1aabff78234b428234189ee1093fb65f85fa3

std.net.Ip6Address: format numerical scope id


2 files changed, 4 insertions(+), 1 deletions(-)

lib/std/net.zig+3
......@@ -747,6 +747,9 @@ pub const Ip6Address = extern struct {
747747 try w.writeAll(":");
748748 }
749749 }
750 if (self.sa.scope_id != 0) {
751 try w.print("%{}", .{self.sa.scope_id});
752 }
750753 try w.print("]:{}", .{port});
751754 }
752755
lib/std/net/test.zig+1-1
......@@ -73,7 +73,7 @@ test "parse and render IPv6 addresses" {
7373 "2001:db8::",
7474 "::1234:5678",
7575 "2001:db8::1234:5678",
76 "ff01::fb",
76 "ff01::fb%1234",
7777 "::ffff:123.5.123.5",
7878 };
7979 for (ips, 0..) |ip, i| {