Skip to content

Commit

Permalink
Fixed clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kitao committed Dec 28, 2024
1 parent 82ec63b commit e5f20af
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixed to include the LICENSE file in the Python package
- Excluded the pycache directory from the copy_examples command
- Updated the message image for the READMEs
- Fixed clippy warnings

## 2.2.8

Expand Down
2 changes: 1 addition & 1 deletion rust/pyxel-engine/src/blip_buf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl BlipBuf {
let fixed = ((time * self.factor + self.offset) >> PRE_SHIFT) as u64;
let out = &mut self.buf[(self.avail as usize + (fixed >> FRAC_BITS) as usize)..];

let interp = (fixed >> (FRAC_BITS - DELTA_BITS) & (DELTA_UNIT - 1) as u64) as i32;
let interp = ((fixed >> (FRAC_BITS - DELTA_BITS)) & (DELTA_UNIT - 1) as u64) as i32;
let delta2 = delta * interp;

out[7] += delta * DELTA_UNIT - delta2;
Expand Down
4 changes: 2 additions & 2 deletions rust/pyxel-engine/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ impl Image {
let mut closest_color: Color = 0;
if include_colors {
colors.push(
(src_rgb.0 as u32) << 16
| (src_rgb.1 as u32) << 8
((src_rgb.0 as u32) << 16)
| ((src_rgb.1 as u32) << 8)
| src_rgb.2 as u32,
);
closest_color = colors.len() as Color - 1;
Expand Down
1 change: 1 addition & 0 deletions rust/pyxel-wrapper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
clippy::redundant_closure_call,
clippy::too_many_arguments,
clippy::too_many_lines,
clippy::useless_conversion,
clippy::wrong_self_convention
)]

Expand Down

0 comments on commit e5f20af

Please sign in to comment.