Skip to content

Commit a408559

Browse files
committed
Fixed clippy warnings
1 parent 1f631ee commit a408559

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Fixed to include the LICENSE file in the Python package
66
- Excluded the pycache directory from the copy_examples command
77
- Updated the message image for the READMEs
8+
- Fixed clippy warnings
89

910
## 2.2.8
1011

rust/pyxel-engine/src/blip_buf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl BlipBuf {
123123
let fixed = ((time * self.factor + self.offset) >> PRE_SHIFT) as u64;
124124
let out = &mut self.buf[(self.avail as usize + (fixed >> FRAC_BITS) as usize)..];
125125

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

129129
out[7] += delta * DELTA_UNIT - delta2;

rust/pyxel-engine/src/image.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ impl Image {
6565
let mut closest_color: Color = 0;
6666
if include_colors {
6767
colors.push(
68-
(src_rgb.0 as u32) << 16
69-
| (src_rgb.1 as u32) << 8
68+
((src_rgb.0 as u32) << 16)
69+
| ((src_rgb.1 as u32) << 8)
7070
| src_rgb.2 as u32,
7171
);
7272
closest_color = colors.len() as Color - 1;

rust/pyxel-wrapper/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
clippy::redundant_closure_call,
1010
clippy::too_many_arguments,
1111
clippy::too_many_lines,
12+
clippy::useless_conversion,
1213
clippy::wrong_self_convention
1314
)]
1415

0 commit comments

Comments
 (0)