Skip to content

Commit

Permalink
fix: clippy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
nenikitov committed Jan 26, 2024
1 parent 41d7126 commit 23b7c83
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions engine/src/asset/texture/dat/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ impl AssetParser<Wildcard> for Texture {
type Context<'ctx> = TextureSize;

fn parser(size: Self::Context<'_>) -> impl Fn(Input) -> Result<Self::Output> {
let width = size.width as usize;
let height = size.height as usize;

move |input| {
let (input, colors) = multi::count!(number::le_u8, width * height)(input)?;
let (input, colors) = multi::count!(number::le_u8, size.width * size.height)(input)?;

let colors = colors
.into_iter()
.chunks(width)
.chunks(size.width)
.into_iter()
.map(Iterator::collect)
.collect();
Expand Down

0 comments on commit 23b7c83

Please sign in to comment.