aboutsummaryrefslogtreecommitdiff
path: root/src/string_immutable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r--src/string_immutable.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig
index e5a37006a..e85fc4ef8 100644
--- a/src/string_immutable.zig
+++ b/src/string_immutable.zig
@@ -588,7 +588,7 @@ pub inline fn endsWithChar(self: string, char: u8) bool {
pub fn withoutTrailingSlash(this: string) []const u8 {
var href = this;
while (href.len > 1 and href[href.len - 1] == '/') {
- href = href[0 .. href.len - 1];
+ href.len -= 1;
}
return href;