From c6f3e4bd5aacef63fa98bf025de13c29192b84c7 Mon Sep 17 00:00:00 2001 From: Josh Wolfe Date: Sun, 17 Aug 2025 16:38:50 -0400 Subject: [PATCH] use correct error type --- lib/std/cli.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/cli.zig b/lib/std/cli.zig index a02a7d7e151a1798ea3ce3731f6d619de5cf0313..bf4cf118b23fcb438acb59c31683529bcd016d10 100644 --- a/lib/std/cli.zig +++ b/lib/std/cli.zig @@ -118,7 +118,7 @@ pub const Error = error{ /// /// It is not possible to precisely deallocate the memory allocated by this function. /// An `ArenaAllocator` is recommended to prevent memory leaks. -pub fn parse(comptime Args: type, arena: Allocator, options: Options) Error!Args { +pub fn parse(comptime Args: type, arena: Allocator, options: Options) (Error || ArgIterator.InitError)!Args { var iter: ArgIterator = try .initWithAllocator(arena); // Do not call iter.deinit(). It holds the string data returned in the Args. -- 2.54.0