diff --git a/lib/std/Uri.zig b/lib/std/Uri.zig index ff4f6fad8a..8b455c6c71 100644 --- a/lib/std/Uri.zig +++ b/lib/std/Uri.zig @@ -318,7 +318,7 @@ pub fn format( ) @TypeOf(writer).Error!void { _ = options; - const scheme = comptime std.mem.indexOf(u8, fmt, ":") != null or fmt.len == 0; + const scheme = comptime std.mem.indexOf(u8, fmt, ";") != null or fmt.len == 0; const authentication = comptime std.mem.indexOf(u8, fmt, "@") != null or fmt.len == 0; const authority = comptime std.mem.indexOf(u8, fmt, "+") != null or fmt.len == 0; const path = comptime std.mem.indexOf(u8, fmt, "/") != null or fmt.len == 0; @@ -850,7 +850,7 @@ test "format" { }; var buf = std.ArrayList(u8).init(std.testing.allocator); defer buf.deinit(); - try uri.format(":/?#", .{}, buf.writer()); + try buf.writer().print("{;/?#}", .{uri}); try std.testing.expectEqualSlices(u8, "file:/foo/bar/baz", buf.items); } diff --git a/src/Package/Fetch.zig b/src/Package/Fetch.zig index 3f44dd98ef..58fdb68278 100644 --- a/src/Package/Fetch.zig +++ b/src/Package/Fetch.zig @@ -915,7 +915,7 @@ fn initResource(f: *Fetch, uri: std.Uri) RunError!Resource { }); const notes_start = try eb.reserveNotes(notes_len); eb.extra.items[notes_start] = @intFromEnum(try eb.addErrorMessage(.{ - .msg = try eb.printString("try .url = \"{+/}#{}\",", .{ + .msg = try eb.printString("try .url = \"{;+/}#{}\",", .{ uri, std.fmt.fmtSliceHexLower(&want_oid), }), }));