authorgravatar for johnnymarler@gmail.comJonathan Marler <johnnymarler@gmail.com> 2022-01-13 07:57:12-07:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-01-20 10:55:10+02:00
log0e682e71b009ae3f627aae692037559e51db7b39
treeb0cea48de7194ee4a50bdce2da5187344ebdd240
parentb7ba728929df7a7e2fde11004c6cb8d1575b8514

remove unnecessary self argument


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

lib/std/process.zig+4-5
...@@ -393,7 +393,7 @@ pub const ArgIteratorWindows = struct {...@@ -393,7 +393,7 @@ pub const ArgIteratorWindows = struct {
393 },393 },
394 '"' => {394 '"' => {
395 const quote_is_real = backslash_count % 2 == 0;395 const quote_is_real = backslash_count % 2 == 0;
396 try self.emitBackslashes(&buf, backslash_count / 2);396 try emitBackslashes(&buf, backslash_count / 2);
397 backslash_count = 0;397 backslash_count = 0;
398398
399 if (quote_is_real) {399 if (quote_is_real) {
...@@ -406,7 +406,7 @@ pub const ArgIteratorWindows = struct {...@@ -406,7 +406,7 @@ pub const ArgIteratorWindows = struct {
406 backslash_count += 1;406 backslash_count += 1;
407 },407 },
408 ' ', '\t' => {408 ' ', '\t' => {
409 try self.emitBackslashes(&buf, backslash_count);409 try emitBackslashes(&buf, backslash_count);
410 backslash_count = 0;410 backslash_count = 0;
411 if (in_quote) {411 if (in_quote) {
412 try buf.append(std.mem.nativeToLittle(u16, character));412 try buf.append(std.mem.nativeToLittle(u16, character));
...@@ -415,7 +415,7 @@ pub const ArgIteratorWindows = struct {...@@ -415,7 +415,7 @@ pub const ArgIteratorWindows = struct {
415 }415 }
416 },416 },
417 else => {417 else => {
418 try self.emitBackslashes(&buf, backslash_count);418 try emitBackslashes(&buf, backslash_count);
419 backslash_count = 0;419 backslash_count = 0;
420 try buf.append(std.mem.nativeToLittle(u16, character));420 try buf.append(std.mem.nativeToLittle(u16, character));
421 },421 },
...@@ -433,8 +433,7 @@ pub const ArgIteratorWindows = struct {...@@ -433,8 +433,7 @@ pub const ArgIteratorWindows = struct {
433 error.OutOfMemory => return error.OutOfMemory,433 error.OutOfMemory => return error.OutOfMemory,
434 };434 };
435 }435 }
436 fn emitBackslashes(self: *ArgIteratorWindows, buf: *std.ArrayList(u16), emit_count: usize) !void {436 fn emitBackslashes(buf: *std.ArrayList(u16), emit_count: usize) !void {
437 _ = self;
438 var i: usize = 0;437 var i: usize = 0;
439 while (i < emit_count) : (i += 1) {438 while (i < emit_count) : (i += 1) {
440 try buf.append(std.mem.nativeToLittle(u16, '\\'));439 try buf.append(std.mem.nativeToLittle(u16, '\\'));