Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Aug 23, 2023
1 parent 97d2dc2 commit 2be6d93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ pub fn decode_into(
for i in 0..colors.len() {
if i == 0 {
let value = base83::decode(&blurhash[2..6])?;
colors[i as usize] = dc::decode(value as u32);
colors[i] = dc::decode(value as u32);
} else {
let value = base83::decode(&blurhash[4 + i * 2..6 + i * 2])?;
colors[i as usize] = ac::decode(value as u32, maximum_value * punch);
colors[i] = ac::decode(value as u32, maximum_value * punch);
}
}

Expand All @@ -170,7 +170,7 @@ pub fn decode_into(
for i in 0..num_x {
let basis = f32::cos((PI * x as f32 * i as f32) / width as f32)
* f32::cos((PI * y as f32 * j as f32) / height as f32);
let color = &colors[i + j * num_x as usize];
let color = &colors[i + j * num_x];

pixel[0] += color[0] * basis;
pixel[1] += color[1] * basis;
Expand Down

0 comments on commit 2be6d93

Please sign in to comment.