aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorJonathan Marler <johnnymarler@gmail.com>2023-02-28 13:25:53 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-03-01 12:21:53 -0500
commit4f58a80735b47e6b98ed6f73cc9a0a772cdc6fcd (patch)
tree2b5489bae19a0e75814d476363038e089d1de89b /lib/std
parentef72cd6698e808c731320617ea62c8a33a5ecd87 (diff)
downloadzig-4f58a80735b47e6b98ed6f73cc9a0a772cdc6fcd.tar.gz
zig-4f58a80735b47e6b98ed6f73cc9a0a772cdc6fcd.zip
std.io.zig: fmt
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/io.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/io.zig b/lib/std/io.zig
index b125265449..ea48b2d121 100644
--- a/lib/std/io.zig
+++ b/lib/std/io.zig
@@ -178,7 +178,7 @@ pub fn poll(
if (builtin.os.tag == .windows) result.windows = .{
.first_read_done = false,
- .overlapped = [1]os.windows.OVERLAPPED {
+ .overlapped = [1]os.windows.OVERLAPPED{
mem.zeroes(os.windows.OVERLAPPED),
} ** enum_fields.len,
.active = .{
@@ -227,7 +227,7 @@ pub fn Poller(comptime StreamEnum: type) type {
pub fn removeAt(self: *@This(), index: u32) void {
std.debug.assert(index < self.count);
- for (index + 1 .. self.count) |i| {
+ for (index + 1..self.count) |i| {
self.handles_buf[i - 1] = self.handles_buf[i];
self.stream_map[i - 1] = self.stream_map[i];
}
@@ -241,7 +241,7 @@ pub fn Poller(comptime StreamEnum: type) type {
pub fn deinit(self: *Self) void {
if (builtin.os.tag == .windows) {
// cancel any pending IO to prevent clobbering OVERLAPPED value
- for (self.windows.active.handles_buf[0 .. self.windows.active.count]) |h| {
+ for (self.windows.active.handles_buf[0..self.windows.active.count]) |h| {
_ = os.windows.kernel32.CancelIo(h);
}
}
@@ -381,7 +381,7 @@ fn windowsAsyncRead(
overlapped: *os.windows.OVERLAPPED,
fifo: *PollFifo,
bump_amt: usize,
-) !enum{ pending, closed } {
+) !enum { pending, closed } {
while (true) {
const buf = try fifo.writableWithSize(bump_amt);
var read_bytes: u32 = undefined;