aboutsummaryrefslogtreecommitdiff
path: root/lib/std/event
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-02-24 21:29:01 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-02-24 21:29:23 -0700
commit5f35dc0c0d0530d5a1d028c56a763def3d1fd250 (patch)
tree75a0872005d2f0e5a1c12c31072a471e9ea185d8 /lib/std/event
parentd7049fc8e0709619b8aa6766b37abeae946703b2 (diff)
downloadzig-5f35dc0c0d0530d5a1d028c56a763def3d1fd250.tar.gz
zig-5f35dc0c0d0530d5a1d028c56a763def3d1fd250.zip
zig fmt the std lib
Diffstat (limited to 'lib/std/event')
-rw-r--r--lib/std/event/batch.zig19
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;
}
};