Skip to content

Commit

Permalink
Fix nom4 'nom::Needed' compatibility bug
Browse files Browse the repository at this point in the history
A `Needed::Size(sz)` now only returns additional data needed, not total
required
  • Loading branch information
akubera committed Dec 20, 2018
1 parent 4fa8896 commit 5dd86c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion root-io/src/core/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ fn parse_buffer<R, F, O>(reader: &mut BufReader<R>, buf_size: usize, f: F)
// Reset seek position and try again with updated buf size
reader.seek(SeekFrom::Current(-(read_bytes as i64)))?;
match needed {
Needed::Size(s) => parse_buffer(reader, s, f),
Needed::Size(s) => parse_buffer(reader, read_bytes + s, f),
_ => parse_buffer(reader, buf_size + 1000, f),
}
},
Expand Down

0 comments on commit 5dd86c0

Please sign in to comment.