diff options
| -rw-r--r-- | clap.zig | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -93,7 +93,7 @@ pub const Names = struct { | |||
| 93 | /// * Value parameters must take a value. | 93 | /// * Value parameters must take a value. |
| 94 | pub fn Param(comptime Id: type) type { | 94 | pub fn Param(comptime Id: type) type { |
| 95 | return struct { | 95 | return struct { |
| 96 | const Self = this; | 96 | const Self = @This(); |
| 97 | 97 | ||
| 98 | id: Id, | 98 | id: Id, |
| 99 | takes_value: bool, | 99 | takes_value: bool, |
| @@ -119,7 +119,7 @@ pub fn Param(comptime Id: type) type { | |||
| 119 | /// The result returned from ::Clap.next | 119 | /// The result returned from ::Clap.next |
| 120 | pub fn Arg(comptime Id: type) type { | 120 | pub fn Arg(comptime Id: type) type { |
| 121 | return struct { | 121 | return struct { |
| 122 | const Self = this; | 122 | const Self = @This(); |
| 123 | 123 | ||
| 124 | param: *const Param(Id), | 124 | param: *const Param(Id), |
| 125 | value: ?[]const u8, | 125 | value: ?[]const u8, |
| @@ -136,7 +136,7 @@ pub fn Arg(comptime Id: type) type { | |||
| 136 | /// A interface for iterating over command line arguments | 136 | /// A interface for iterating over command line arguments |
| 137 | pub fn ArgIterator(comptime E: type) type { | 137 | pub fn ArgIterator(comptime E: type) type { |
| 138 | return struct { | 138 | return struct { |
| 139 | const Self = this; | 139 | const Self = @This(); |
| 140 | const Error = E; | 140 | const Error = E; |
| 141 | 141 | ||
| 142 | nextFn: fn (iter: *Self) Error!?[]const u8, | 142 | nextFn: fn (iter: *Self) Error!?[]const u8, |
| @@ -210,7 +210,7 @@ pub const OsArgIterator = struct { | |||
| 210 | /// ::Clap.next to parse all the arguments of your program. | 210 | /// ::Clap.next to parse all the arguments of your program. |
| 211 | pub fn Clap(comptime Id: type, comptime ArgError: type) type { | 211 | pub fn Clap(comptime Id: type, comptime ArgError: type) type { |
| 212 | return struct { | 212 | return struct { |
| 213 | const Self = this; | 213 | const Self = @This(); |
| 214 | 214 | ||
| 215 | const State = union(enum) { | 215 | const State = union(enum) { |
| 216 | Normal, | 216 | Normal, |