From c78d362fa20393621ac198861f891439f9d832e9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 9 Nov 2026 02:04:25 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/Names.zig | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/Names.zig') 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)); -- cgit v1.3