authorgravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2025-08-17 16:38:50-04:00
committergravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2025-08-30 22:36:30-04:00
logc6f3e4bd5aacef63fa98bf025de13c29192b84c7
tree51c837a1354330f5c409b18bc44e7d2b9a27682d
parentf27e5649a5bf2969ba04e1415aaf1985bf070211

use correct error type


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/cli.zig+1-1
...@@ -118,7 +118,7 @@ pub const Error = error{...@@ -118,7 +118,7 @@ pub const Error = error{
118///118///
119/// It is not possible to precisely deallocate the memory allocated by this function.119/// It is not possible to precisely deallocate the memory allocated by this function.
120/// An `ArenaAllocator` is recommended to prevent memory leaks.120/// An `ArenaAllocator` is recommended to prevent memory leaks.
121pub fn parse(comptime Args: type, arena: Allocator, options: Options) Error!Args {121pub fn parse(comptime Args: type, arena: Allocator, options: Options) (Error || ArgIterator.InitError)!Args {
122 var iter: ArgIterator = try .initWithAllocator(arena);122 var iter: ArgIterator = try .initWithAllocator(arena);
123 // Do not call iter.deinit(). It holds the string data returned in the Args.123 // Do not call iter.deinit(). It holds the string data returned in the Args.
124124