lib/reader: fmt

This commit is contained in:
Paul Stemmet 2021-06-03 16:24:45 +00:00 committed by Paul Stemmet
parent 95e1edd194
commit 2e3562c28e
1 changed files with 3 additions and 2 deletions

View File

@ -49,8 +49,9 @@ where
/// Attempt to reserve up to amt chars, returning the actual number added
pub fn reserve(&mut self, amt: usize) -> Result<usize> {
let mut done = 1;
while done <= amt {
let mut done = 0;
while done < amt {
match self.src.next() {
Some(Ok(c)) => self.buffer.push_front(c),
Some(Err(e)) => return Err(e),