mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 00:08:59 +00:00
url: improve url format
This commit is contained in:
@@ -67,7 +67,7 @@ pub const URL = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(self: *URL, alloc: std.mem.Allocator) void {
|
pub fn deinit(self: *URL, alloc: std.mem.Allocator) void {
|
||||||
self.search_params.deinit();
|
self.search_params.deinit(alloc);
|
||||||
alloc.free(self.rawuri);
|
alloc.free(self.rawuri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,9 +90,9 @@ pub const URL = struct {
|
|||||||
.scheme = true,
|
.scheme = true,
|
||||||
.authentication = true,
|
.authentication = true,
|
||||||
.authority = true,
|
.authority = true,
|
||||||
.path = true,
|
.path = self.uri.path.len > 0,
|
||||||
.query = true,
|
.query = self.uri.query != null and self.uri.query.?.len > 0,
|
||||||
.fragment = true,
|
.fragment = self.uri.fragment != null and self.uri.fragment.?.len > 0,
|
||||||
}, buf.writer());
|
}, buf.writer());
|
||||||
return try buf.toOwnedSlice();
|
return try buf.toOwnedSlice();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user