Skip to content

Commit

Permalink
Debug: Remove the conditional on buffer size.
Browse files Browse the repository at this point in the history
Wasn't really any more useful than the numbers.
  • Loading branch information
Freaky committed Apr 22, 2018
1 parent 4f3a881 commit 0087e73
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,11 @@ use std::fmt;

impl<R: io::Read> fmt::Debug for LineReader<R> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if self.buf.len() < 80 {
write!(f, "[")?;
for _ in 0..self.buf.len() {
write!(f, "-")?
}
write!(f, "]\nP")?;
for _ in 0..self.pos {
write!(f, "X")?;
}
write!(f, "\nC")?;
for _ in 0..self.end_of_complete {
write!(f, "#")?;
}
write!(f, "\nU")?;
for _ in 0..self.end_of_buffer {
write!(f, "=")?;
}
write!(f, "\n")
} else {
write!(
f,
"LineReader {{ delimiter: {:?}, pos: {}, end_of_complete: {}, end_of_buffer: {} }}",
self.delimiter, self.pos, self.end_of_complete, self.end_of_buffer
)
}
write!(
f,
"LineReader {{ delimiter: {:?}, pos: {}, end_of_complete: {}, end_of_buffer: {} }}",
self.delimiter, self.pos, self.end_of_complete, self.end_of_buffer
)
}
}

Expand Down

0 comments on commit 0087e73

Please sign in to comment.