File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -334,10 +334,12 @@ pub fn GenericReader(
334
334
fn stream (r : * Reader , w : * Writer , limit : Limit ) Reader.StreamError ! usize {
335
335
const a : * @This () = @alignCast (@fieldParentPtr ("new_interface" , r ));
336
336
const buf = limit .slice (try w .writableSliceGreedy (1 ));
337
- return a .derp_reader .read (buf ) catch | err | {
337
+ const n = a .derp_reader .read (buf ) catch | err | {
338
338
a .err = err ;
339
339
return error .ReadFailed ;
340
340
};
341
+ w .advance (n );
342
+ return n ;
341
343
}
342
344
};
343
345
};
Original file line number Diff line number Diff line change @@ -393,10 +393,12 @@ pub const Adapter = struct {
393
393
fn stream (r : * std.io.Reader , w : * std.io.Writer , limit : std.io.Limit ) std.io.Reader.StreamError ! usize {
394
394
const a : * @This () = @alignCast (@fieldParentPtr ("new_interface" , r ));
395
395
const buf = limit .slice (try w .writableSliceGreedy (1 ));
396
- return a .derp_reader .read (buf ) catch | err | {
396
+ const n = a .derp_reader .read (buf ) catch | err | {
397
397
a .err = err ;
398
398
return error .ReadFailed ;
399
399
};
400
+ w .advance (n );
401
+ return n ;
400
402
}
401
403
};
402
404
You can’t perform that action at this time.
0 commit comments