I'd like to read a file with separator '>' with maximum read limit.
fn main() {
let mut f = BufReader::new(File::open("Bigfile.txt").unwrap());
let mut v = Vec::new();
for _i in 0..100 {
let tf = f.take(2000);
tf.read_until(b'>', &mut v).unwrap();
f = tf.into_inner();
}
}
Is this okay?
I'm not sure but I think that take() and into_inner() take some time.