Skip to content

Commit

Permalink
Fix new clippy warnings
Browse files Browse the repository at this point in the history
The latest Rust version added some clippy checks.
  • Loading branch information
rom1v authored and lu-zero committed Apr 12, 2019
1 parent e426575 commit f9ae0bc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/bin/decoder/y4m.rs
Expand Up @@ -50,7 +50,7 @@ impl Decoder for y4m::Decoder<'_, Box<dyn Read>> {
);
f
})
.map_err(|e| e.into())
.map_err(Into::into)
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/deblock.rs
Expand Up @@ -1385,7 +1385,6 @@ pub fn deblock_filter_frame<T: Pixel>(
}

fn sse_optimize<T: Pixel>(fs: &mut FrameState<T>, blocks: &FrameBlocks, bit_depth: usize) {
assert!(MAX_LOOP_FILTER < 999);
// i64 allows us to accumulate a total of ~ 35 bits worth of pixels
assert!(
fs.input.planes[0].cfg.width.ilog() + fs.input.planes[0].cfg.height.ilog()
Expand Down Expand Up @@ -1467,8 +1466,7 @@ pub fn deblock_filter_optimize<T: Pixel>(
(q * 20723 + 16_242_526 + (1 << 22 >> 1)) >> 22
},
_ => {
assert!(false);
0
unreachable!()
}
},
0,
Expand Down
2 changes: 1 addition & 1 deletion src/encoder.rs
Expand Up @@ -1977,7 +1977,7 @@ fn encode_partition_topdown<T: Pixel>(
});
}
},
_ => { assert!(false); },
_ => unreachable!(),
}

if is_square && bsize.gte(BlockSize::BLOCK_8X8) &&
Expand Down
2 changes: 1 addition & 1 deletion src/rdo.rs
Expand Up @@ -1200,7 +1200,7 @@ pub fn rdo_partition_decision<T: Pixel>(
}
}
_ => {
assert!(false);
unreachable!();
}
}

Expand Down

0 comments on commit f9ae0bc

Please sign in to comment.