diff --git a/src/Server.zig b/src/Server.zig index 1a80824..2b60c2a 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -1987,7 +1987,7 @@ fn completionHandler(server: *Server, arena: *std.heap.ArenaAllocator, id: types fsc: { var document_path = try uri_utils.parse(arena.allocator(), handle.uri()); - var document_dir_path = std.fs.openDirAbsolute(std.fs.path.dirname(document_path) orelse break :fsc, .{ .iterate = true }) catch break :fsc; + var document_dir_path = std.fs.openIterableDirAbsolute(std.fs.path.dirname(document_path) orelse break :fsc, .{}) catch break :fsc; defer document_dir_path.close(); if (std.mem.lastIndexOfScalar(u8, completing, '/')) |subpath_index| { @@ -2000,7 +2000,7 @@ fn completionHandler(server: *Server, arena: *std.heap.ArenaAllocator, id: types } var old = document_dir_path; - document_dir_path = document_dir_path.openDir(subpath, .{ .iterate = true }) catch break :fsc // NOTE: Is this even safe lol? + document_dir_path = document_dir_path.dir.openIterableDir(subpath, .{}) catch break :fsc // NOTE: Is this even safe lol? old.close(); subpath_present = true; diff --git a/src/analysis.zig b/src/analysis.zig index dcc70f2..ea0b0a4 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -629,19 +629,19 @@ fn allDigits(str: []const u8) bool { pub fn isTypeIdent(tree: Ast, token_idx: Ast.TokenIndex) bool { const PrimitiveTypes = std.ComptimeStringMap(void, .{ - .{"isize"}, .{"usize"}, - .{"c_short"}, .{"c_ushort"}, - .{"c_int"}, .{"c_uint"}, - .{"c_long"}, .{"c_ulong"}, - .{"c_longlong"}, .{"c_ulonglong"}, - .{"c_longdouble"}, .{"anyopaque"}, - .{"f16"}, .{"f32"}, - .{"f64"}, .{"f128"}, - .{"bool"}, .{"void"}, - .{"noreturn"}, .{"type"}, - .{"anyerror"}, .{"comptime_int"}, - .{"comptime_float"}, .{"anyframe"}, - .{"anytype"}, + .{"isize"}, .{"usize"}, + .{"c_short"}, .{"c_ushort"}, + .{"c_int"}, .{"c_uint"}, + .{"c_long"}, .{"c_ulong"}, + .{"c_longlong"}, .{"c_ulonglong"}, + .{"c_longdouble"}, .{"anyopaque"}, + .{"f16"}, .{"f32"}, + .{"f64"}, .{"f80"}, + .{"f128"}, .{"bool"}, + .{"void"}, .{"noreturn"}, + .{"type"}, .{"anyerror"}, + .{"comptime_int"}, .{"comptime_float"}, + .{"anyframe"}, .{"anytype"}, }); const text = tree.tokenSlice(token_idx);