File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -7483,12 +7483,6 @@ fn loadManifest(
7483
7483
const Replacement = struct {
7484
7484
variable : []const u8 ,
7485
7485
replacement : []const u8 ,
7486
-
7487
- pub inline fn check_variable (self : * @This ()) ! void {
7488
- if (self .variable .len < 2 ) {
7489
- return error .InvalidVariable ;
7490
- }
7491
- }
7492
7486
};
7493
7487
7494
7488
const Templates = struct {
@@ -7529,7 +7523,6 @@ const Templates = struct {
7529
7523
// replace variables like $root and $version with the project name
7530
7524
// and zig compiler version respectively
7531
7525
while (iterator .next ()) | line | {
7532
-
7533
7526
var i : usize = 0 ;
7534
7527
while (i < line .len ) : (i += 1 ) {
7535
7528
const c = line [i ];
@@ -7539,7 +7532,9 @@ const Templates = struct {
7539
7532
var found : bool = false ;
7540
7533
7541
7534
for (replace_items ) | replacement | {
7542
- try replacement .check_variable ();
7535
+ if (replacement .variable .len < 2 ) {
7536
+ return error .InvalidVariable ;
7537
+ }
7543
7538
7544
7539
if (line .len - i < replacement .variable .len ) {
7545
7540
continue ;
You can’t perform that action at this time.
0 commit comments