Fix a few clippy warnings
This commit is contained in:
parent
12147521f2
commit
45bed0445d
2 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,7 @@ where
|
|||
|
||||
if unlikely(data.len() < QOI_PADDING_SIZE) {
|
||||
return Err(Error::UnexpectedBufferEnd);
|
||||
} else if unlikely(&data[..QOI_PADDING_SIZE] != &QOI_PADDING) {
|
||||
} else if unlikely(data[..QOI_PADDING_SIZE] != QOI_PADDING) {
|
||||
return Err(Error::InvalidPadding);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ pub struct QoiEncoder<'a> {
|
|||
|
||||
impl<'a> QoiEncoder<'a> {
|
||||
#[inline]
|
||||
#[allow(clippy::cast_possible_truncation)]
|
||||
pub fn new(data: &'a (impl AsRef<[u8]> + ?Sized), width: u32, height: u32) -> Result<Self> {
|
||||
let data = data.as_ref();
|
||||
let mut header =
|
||||
|
|
Loading…
Reference in a new issue