Skip to content

Commit 2ef7ea6

Browse files
committed
change stitch alloc default to .always
1 parent ac75f9b commit 2ef7ea6

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/browser/page.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ pub const Page = struct {
451451

452452
// if a base path is given, we resolve src using base.
453453
if (base) |_base| {
454-
res_src = try URL.stitch(arena, src, _base, .{});
454+
res_src = try URL.stitch(arena, src, _base, .{ .alloc = .if_needed });
455455
}
456456

457457
var origin_url = &self.url;

src/browser/url/url.zig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ pub const URL = struct {
5252
const arena = page.arena;
5353
var raw: []const u8 = undefined;
5454
if (base) |b| {
55-
raw = try @import("../../url.zig").URL.stitch(arena, url, b, .{
56-
.alloc = .always,
57-
});
55+
raw = try @import("../../url.zig").URL.stitch(arena, url, b, .{});
5856
} else {
5957
raw = try arena.dupe(u8, url);
6058
}

src/url.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub const URL = struct {
8484
}
8585

8686
const StitchOpts = struct {
87-
alloc: AllocWhen = .if_needed,
87+
alloc: AllocWhen = .always,
8888

8989
const AllocWhen = enum {
9090
always,

0 commit comments

Comments
 (0)