| ... | @@ -316,9 +316,7 @@ pub const RunResult = struct { | ... | @@ -316,9 +316,7 @@ pub const RunResult = struct { |
| 316 | }; | 316 | }; |
| 317 | | 317 | |
| 318 | fn fifoToOwnedArrayList(fifo: *std.io.PollFifo) std.ArrayList(u8) { | 318 | fn fifoToOwnedArrayList(fifo: *std.io.PollFifo) std.ArrayList(u8) { |
| 319 | if (fifo.head > 0) { | 319 | if (fifo.head != 0) fifo.realign(); |
| 320 | @memcpy(fifo.buf[0..fifo.count], fifo.buf[fifo.head..][0..fifo.count]); | | |
| 321 | } | | |
| 322 | const result = std.ArrayList(u8){ | 320 | const result = std.ArrayList(u8){ |
| 323 | .items = fifo.buf[0..fifo.count], | 321 | .items = fifo.buf[0..fifo.count], |
| 324 | .capacity = fifo.buf.len, | 322 | .capacity = fifo.buf.len, |