Remove warnings from build and satisfied clippy (#1288)

* Prefixed unused functions with underscore

* Applied clippy lints

* Fixed some warnings and removed some `allow` statements
This commit is contained in:
Prikshit Gautam
2023-06-07 14:46:47 +05:30
committed by Keavon Chambers
parent 054acd3cc9
commit 70fcb35444
33 changed files with 54 additions and 60 deletions

View File

@@ -13,7 +13,7 @@ mod base64_serde {
use super::super::Pixel;
use serde::{Deserialize, Deserializer, Serializer};
pub fn as_base64<S, P: Pixel>(key: &Vec<P>, serializer: S) -> Result<S::Ok, S::Error>
pub fn as_base64<S, P: Pixel>(key: &[P], serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
@@ -27,7 +27,7 @@ mod base64_serde {
{
use serde::de::Error;
let color_from_chunk = |chunk: &[u8]| P::from_bytes(chunk.try_into().unwrap());
let color_from_chunk = |chunk: &[u8]| P::from_bytes(chunk);
let colors_from_bytes = |bytes: Vec<u8>| bytes.chunks_exact(P::byte_size()).map(color_from_chunk).collect();