mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
use correct error type
This commit is contained in:
parent
f27e5649a5
commit
c6f3e4bd5a
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user