Skip to content

Commit 2aa7f2e

Browse files
authored
remove async integration (#44)
The async mode has been removed in ziglang/zig#18712
1 parent 806ba01 commit 2aa7f2e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

known-folders.zig

+1-8
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,7 @@ fn getPathXdg(allocator: std.mem.Allocator, arena: *std.heap.ArenaAllocator, fol
163163
if (!folder_spec.env.user_dir) break :env_opt null;
164164

165165
// TODO: add caching so we only need to read once in a run
166-
const config_dir_path = if (std.io.is_async) blk: {
167-
var frame = arena.allocator().create(@Frame(getPathXdg)) catch break :env_opt null;
168-
_ = @asyncCall(frame, {}, getPathXdg, .{ arena.allocator(), arena, .local_configuration });
169-
break :blk (await frame) catch null orelse break :env_opt null;
170-
} else blk: {
171-
break :blk getPathXdg(arena.allocator(), arena, .local_configuration) catch null orelse break :env_opt null;
172-
};
173-
166+
const config_dir_path = getPathXdg(arena.allocator(), arena, .local_configuration) catch null orelse break :env_opt null;
174167
const config_dir = std.fs.cwd().openDir(config_dir_path, .{}) catch break :env_opt null;
175168
const home = std.process.getEnvVarOwned(arena.allocator(), "HOME") catch null orelse break :env_opt null;
176169
const user_dirs = config_dir.openFile("user-dirs.dirs", .{}) catch null orelse break :env_opt null;

0 commit comments

Comments
 (0)