Fetch.git: replace a toss with discardAll

toss is only valid following a peek.
This commit is contained in:
Andrew Kelley 2025-08-08 15:02:28 -07:00
parent 91a81d3846
commit 2a8751e37f

View file

@ -1095,7 +1095,7 @@ pub const Session = struct {
.flush => return error.EndOfStream,
.data => |data| if (data.len > 1) switch (@as(StreamCode, @enumFromInt(data[0]))) {
.pack_data => {
input.toss(1);
try input.discardAll(1);
fs.remaining_len = data.len;
break;
},