aboutsummaryrefslogtreecommitdiff
path: root/src/resolver/resolve_path.zig
diff options
context:
space:
mode:
authorGravatar Alex Lam S.L <alexlamsl@gmail.com> 2023-01-10 15:35:20 +0200
committerGravatar GitHub <noreply@github.com> 2023-01-10 05:35:20 -0800
commit270b07e85e82b46491cc713fb2a5bb973d3de4f6 (patch)
treeb8071eaf835f2aefb8ee95c68f9002d84b7b5761 /src/resolver/resolve_path.zig
parentb458abedbb865461005757cac5ea2b458249ef25 (diff)
downloadbun-270b07e85e82b46491cc713fb2a5bb973d3de4f6.tar.gz
bun-270b07e85e82b46491cc713fb2a5bb973d3de4f6.tar.zst
bun-270b07e85e82b46491cc713fb2a5bb973d3de4f6.zip
use `strings.hasPrefixComptime()` (#1755)
Diffstat (limited to 'src/resolver/resolve_path.zig')
-rw-r--r--src/resolver/resolve_path.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolver/resolve_path.zig b/src/resolver/resolve_path.zig
index 605c16e6a..4db102f59 100644
--- a/src/resolver/resolve_path.zig
+++ b/src/resolver/resolve_path.zig
@@ -31,7 +31,7 @@ inline fn isDotSlash(slice: []const u8) bool {
}
inline fn @"is ../"(slice: []const u8) bool {
- return slice.len >= 3 and strings.eqlComptimeIgnoreLen(slice[0..3], "../");
+ return strings.hasPrefixComptime(slice, "../");
}
// TODO: is it faster to determine longest_common_separator in the while loop