lib/reader: fmt
This commit is contained in:
parent
95e1edd194
commit
2e3562c28e
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue