diff options
| author | Lee Cannon <leecannon@leecannon.xyz> | 2021-10-29 00:37:25 +0100 |
|---|---|---|
| committer | Lee Cannon <leecannon@leecannon.xyz> | 2021-11-30 23:32:47 +0000 |
| commit | 85de022c5671d777f62ddff254a814dab05242fc (patch) | |
| tree | 037f58c4b07d18b80cf48cf74d0f0e8c8866f8f2 /lib/std/event/loop.zig | |
| parent | 1e0addcf73ee71d23a41b744995848bcca38e8d3 (diff) | |
| download | zig-85de022c5671d777f62ddff254a814dab05242fc.tar.gz zig-85de022c5671d777f62ddff254a814dab05242fc.zip | |
allocgate: std Allocator interface refactor
Diffstat (limited to 'lib/std/event/loop.zig')
| -rw-r--r-- | lib/std/event/loop.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 042c8bc3cc..413b23cd48 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -727,7 +727,7 @@ pub const Loop = struct { /// with `allocator` and freed when the function returns. /// `func` must return void and it can be an async function. /// Yields to the event loop, running the function on the next tick. - pub fn runDetached(self: *Loop, alloc: *mem.Allocator, comptime func: anytype, args: anytype) error{OutOfMemory}!void { + pub fn runDetached(self: *Loop, alloc: mem.Allocator, comptime func: anytype, args: anytype) error{OutOfMemory}!void { if (!std.io.is_async) @compileError("Can't use runDetached in non-async mode!"); if (@TypeOf(@call(.{}, func, args)) != void) { @compileError("`func` must not have a return value"); @@ -735,7 +735,7 @@ pub const Loop = struct { const Wrapper = struct { const Args = @TypeOf(args); - fn run(func_args: Args, loop: *Loop, allocator: *mem.Allocator) void { + fn run(func_args: Args, loop: *Loop, allocator: mem.Allocator) void { loop.beginOneEvent(); loop.yield(); @call(.{}, func, func_args); // compile error when called with non-void ret type |
