summaryrefslogtreecommitdiff
path: root/src/Names.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-09 02:04:25 -0300
committerGabriel Schneider <[email protected]>2026-11-09 02:14:10 -0300
commitc78d362fa20393621ac198861f891439f9d832e9 (patch)
tree7ba6d82f7dca1926abf7a985cf3830c69d21c90c /src/Names.zig
parent69b993d585cfb14c607f46aba500b141b85516ff (diff)
downloadpardes-c78d362fa20393621ac198861f891439f9d832e9.tar.gz
pardes-c78d362fa20393621ac198861f891439f9d832e9.zip
locality: caller-led moves: MAX_JUMPS into Jump.zig (Core's unused alias goes), RasterPolicy and rasterPolicy beside Kind.viewOf, Names.relative beside Query.startSource, fs.find_skip beside Stream's max_walk_depth, File.drawGutter and drawWrapMarkers beside body_layer.renderBody; each unit's only users are in its new file
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Names.zig')
-rw-r--r--src/Names.zig6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/Names.zig b/src/Names.zig
index d9597994..af1d5c2d 100644
--- a/src/Names.zig
+++ b/src/Names.zig
@@ -100,12 +100,6 @@ pub fn add(n: *Names, gpa: std.mem.Allocator, row_in: []const u8, key: usize, ke
for (text) |c| n.lower.appendAssumeCapacity(std.ascii.toLower(c));
}
-pub fn relative(path: []const u8, dir: []const u8) []const u8 {
- const d = std.mem.trimEnd(u8, dir, "/");
- if (d.len > 0 and path.len > d.len + 1 and std.mem.startsWith(u8, path, d) and path[d.len] == '/') return path[d.len + 1 ..];
- return path;
-}
-
pub fn baseOf(path: []const u8) u16 {
const slash = std.mem.lastIndexOfScalar(u8, std.mem.trimEnd(u8, path, "/"), '/') orelse return 0;
return @intCast(@min(slash + 1, max_text));