@@ -150,13 +150,13 @@ fn anyzigLog(
150150
151151const Extent = struct { start : usize , limit : usize };
152152
153- fn extractMinZigVersion (zon : []const u8 ) ! ? Extent {
153+ fn extractMinZigVersion (zon : []const u8 ) ? Extent {
154154 return extractZigVersion (zon , ".minimum_zig_version" );
155155}
156- fn extractMachZigVersion (zon : []const u8 ) ! ? Extent {
156+ fn extractMachZigVersion (zon : []const u8 ) ? Extent {
157157 return extractZigVersion (zon , ".mach_zig_version" );
158158}
159- fn extractZigVersion (zon : []const u8 , needle : []const u8 ) ! ? Extent {
159+ fn extractZigVersion (zon : []const u8 , needle : []const u8 ) ? Extent {
160160 var offset : usize = 0 ;
161161 while (true ) {
162162 offset = skipWhitespaceAndComments (zon , offset );
@@ -249,7 +249,7 @@ fn determineSemanticVersion(scratch: Allocator, build_root: BuildRoot) !Semantic
249249 };
250250 defer scratch .free (zon );
251251
252- if (try extractMachZigVersion (zon )) | version_extent | {
252+ if (extractMachZigVersion (zon )) | version_extent | {
253253 const version = zon [version_extent .start .. version_extent .limit ];
254254 if (! std .mem .endsWith (u8 , version , "-mach" )) errExit (
255255 "expected the .mach_zig_version value to end with '-mach' but got '{s}'" ,
@@ -265,7 +265,7 @@ fn determineSemanticVersion(scratch: Allocator, build_root: BuildRoot) !Semantic
265265 );
266266 }
267267
268- const version_extent = try extractMinZigVersion (zon ) orelse errExit (
268+ const version_extent = extractMinZigVersion (zon ) orelse errExit (
269269 "build.zig.zon is missing minimum_zig_version, either add it or run '{s} VERSION' to specify a version" ,
270270 .{@tagName (build_options .exe )},
271271 );
@@ -504,7 +504,7 @@ pub fn main() !void {
504504 , .{semantic_version });
505505 return ;
506506 };
507- const version_extent = try extractMinZigVersion (zon ) orelse {
507+ const version_extent = extractMinZigVersion (zon ) orelse {
508508 if (! std .mem .startsWith (u8 , zon , ".{" )) @panic ("zon file did not start with '.{'" );
509509 if (zon .len < 2 or zon [2 ] != '\n ' ) @panic ("zon file not start with '.{\\ n" );
510510 const f = try std .fs .cwd ().createFile ("build.zig.zon" , .{});
0 commit comments