Skip to content

Lightpanda: the headless browser designed for AI and automation

remove unnecessary `pub` marking

Halil Durak53f513f1f8ae
diff --git a/src/network/adblock/Engine.zig b/src/network/adblock/Engine.zig
index 8b84705cc..6b1cd800e 100644
--- a/src/network/adblock/Engine.zig
+++ b/src/network/adblock/Engine.zig
@@ -118,7 +118,7 @@ fn matchIn(self: *const Engine, bucket: []const u32, request: Request) ?*const N
/// Cheapest constraint first: the type and party bits are two comparisons,
/// the pattern walk is the expensive one.
-pub fn matchesFilter(filter: *const NetworkFilter, request: Request) bool {
+fn matchesFilter(filter: *const NetworkFilter, request: Request) bool {
if (filter.types.bits() & request.kind.bits() == 0) return false;
if (request.third_party) {
if (!filter.third_party) return false;
diff --git a/src/network/adblock/domain.zig b/src/network/adblock/domain.zig
index ab0ba3c9c..3f2c4dad1 100644
--- a/src/network/adblock/domain.zig
+++ b/src/network/adblock/domain.zig
@@ -74,7 +74,7 @@ fn matchEntry(e: Entry, hostname: []const u8, ent: []const u8) bool {
}
/// Whether `hostname` is `suffix` or one of its subdomains.
-pub fn isSubdomainOf(hostname: []const u8, suffix: []const u8) bool {
+fn isSubdomainOf(hostname: []const u8, suffix: []const u8) bool {
if (hostname.len == suffix.len) return std.mem.eql(u8, hostname, suffix);
if (hostname.len < suffix.len + 1) return false;
const at = hostname.len - suffix.len;
@@ -136,7 +136,7 @@ pub fn parse(
};
}
-pub fn registrable(host: []const u8) []const u8 {
+fn registrable(host: []const u8) []const u8 {
if (isIpLiteral(host)) return host;
var i = std.mem.lastIndexOfScalar(u8, host, '.') orelse return host;
while (true) {
@@ -148,7 +148,7 @@ pub fn registrable(host: []const u8) []const u8 {
}
}
-pub fn entity(host: []const u8) []const u8 {
+fn entity(host: []const u8) []const u8 {
if (isIpLiteral(host)) return "";
const reg = registrable(host);
const dot = std.mem.indexOfScalar(u8, reg, '.') orelse return "";
diff --git a/src/network/adblock/pattern.zig b/src/network/adblock/pattern.zig
index ad6999ef0..012875a98 100644
--- a/src/network/adblock/pattern.zig
+++ b/src/network/adblock/pattern.zig
@@ -223,7 +223,7 @@ fn matchSegmentAtEnd(segment: []const u8, url: []const u8, from: usize) bool {
}
/// uBO's separator class: everything that cannot appear in a hostname or an unescaped path word.
-pub fn isSeparator(c: u8) bool {
+fn isSeparator(c: u8) bool {
if (std.ascii.isAlphanumeric(c)) return false;
return switch (c) {
'_', '%', '.', '-' => false,