ref: 7d4e8b50cac2af2cce372bfbebc3addc752eab25
parent: 2a9a9eba576c0932b7828fda9995a2335e789b2f
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Oct 12 10:38:24 EDT 2018
Don't readinto if we're dropping.
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -422,7 +422,11 @@
* delimiter at the end. If we're at 0 bytes even
* then, return an eof.
*/
- readinto(f, &ret, f.rend - f.rstart)
+ if drop
+ f.rstart += f.rend - f.rstart
+ else
+ readinto(f, &ret, f.rend - f.rstart)
+ ;;
match ret.len
| 0: -> `std.Err `Eof
| _: -> `std.Ok ret