Cleanup code that was warned by rust-clippy

This commit is contained in:
Corey Farwell 2015-10-11 20:47:45 -04:00
parent 9c1cb9f61e
commit 81e034885b
9 changed files with 273 additions and 284 deletions

View file

@ -24,7 +24,7 @@ enum ReadStatus {
fn read_block(reader: &mut File) -> Result<ReadStatus, String> {
let mut buf = vec![0; READ_SIZE];
match reader.read(&mut buf) {
Ok(0) => return Ok(ReadStatus::EOF),
Ok(0) => Ok(ReadStatus::EOF),
Ok(n) => {
buf.truncate(n);
Ok(ReadStatus::Partial(buf))