diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-24 21:29:01 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-24 21:29:23 -0700 |
| commit | 5f35dc0c0d0530d5a1d028c56a763def3d1fd250 (patch) | |
| tree | 75a0872005d2f0e5a1c12c31072a471e9ea185d8 /lib/std/event | |
| parent | d7049fc8e0709619b8aa6766b37abeae946703b2 (diff) | |
| download | zig-5f35dc0c0d0530d5a1d028c56a763def3d1fd250.tar.gz zig-5f35dc0c0d0530d5a1d028c56a763def3d1fd250.zip | |
zig fmt the std lib
Diffstat (limited to 'lib/std/event')
| -rw-r--r-- | lib/std/event/batch.zig | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/std/event/batch.zig b/lib/std/event/batch.zig index 72e0bd13fc..5368c5336d 100644 --- a/lib/std/event/batch.zig +++ b/lib/std/event/batch.zig @@ -98,15 +98,16 @@ pub fn Batch( /// This function is *not* thread-safe. It must be called from one thread at /// a time, however, it need not be the same thread. pub fn wait(self: *Self) CollectedResult { - for (self.jobs) |*job| if (job.frame) |f| { - job.result = if (async_ok) await f else nosuspend await f; - if (CollectedResult != void) { - job.result catch |err| { - self.collected_result = err; - }; - } - job.frame = null; - }; + for (self.jobs) |*job| + if (job.frame) |f| { + job.result = if (async_ok) await f else nosuspend await f; + if (CollectedResult != void) { + job.result catch |err| { + self.collected_result = err; + }; + } + job.frame = null; + }; return self.collected_result; } }; |
