From 97b691c7be2de969b2a290fce4b41272c6a83bf7 Mon Sep 17 00:00:00 2001 From: mochalins <117967760+mochalins@users.noreply.github.com> Date: Tue, 24 Sep 2024 00:54:40 +0900 Subject: [PATCH] fix: Iterator definition --- src/serialport.zig | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/serialport.zig b/src/serialport.zig index 295708a..dcbaeba 100644 --- a/src/serialport.zig +++ b/src/serialport.zig @@ -221,19 +221,8 @@ pub const Stub = struct { }; pub const Iterator = switch (builtin.target.os.tag) { - .linux => linux.Iterator, - .macos => macos.Iterator, - else => struct { - _impl: backend.IteratorImpl, - - pub fn next(self: *@This()) !?Stub { - return self._impl.next(); - } - - pub fn deinit(self: *@This()) void { - self._impl.deinit(); - } - }, + .linux, .macos, .windows => backend.Iterator, + else => @compileError("unsupported OS"), }; const backend = switch (builtin.target.os.tag) {