1
Fork 0

Fallout from stabilization

This commit is contained in:
Aaron Turon 2014-12-30 10:51:18 -08:00
parent 6e1879eaf1
commit 6abfac083f
78 changed files with 410 additions and 425 deletions

View file

@ -439,9 +439,10 @@ mod test {
impl Reader for ShortReader {
fn read(&mut self, _: &mut [u8]) -> io::IoResult<uint> {
match self.lengths.remove(0) {
Some(i) => Ok(i),
None => Err(io::standard_error(io::EndOfFile))
if self.lengths.is_empty() {
Err(io::standard_error(io::EndOfFile))
} else {
Ok(self.lengths.remove(0))
}
}
}