mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Cleanup code that was warned by rust-clippy
This commit is contained in:
parent
9c1cb9f61e
commit
81e034885b
9 changed files with 273 additions and 284 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue