Skip to content

Commit a946754

Browse files
committed
Fix more warnings
1 parent fa61f4b commit a946754

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

core/src/gpu/vram/bank_cnt.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,7 @@ impl Vram {
425425
(&mut *self.writeback.$usage.get()).fill(0);
426426
for (region, mapped) in self.map.$usage.iter().enumerate() {
427427
let mapped = mapped.get();
428-
let mask = if mapped != 0
429-
&& mapped & (mapped - 1) == 0
428+
let mask = if mapped.is_power_of_two()
430429
&& mapped & $mirrored_banks_mask == 0
431430
&& self.bg_obj_updates.is_none()
432431
{

core/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
clippy::must_use_candidate,
3232
clippy::missing_errors_doc,
3333
clippy::inline_always,
34-
clippy::new_without_default
34+
clippy::new_without_default,
35+
clippy::manual_is_power_of_two
3536
)]
3637

3738
pub extern crate emu_utils as utils;

frontend/desktop/src/input/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Serialize for Map {
124124
&'a HashMap<T, U>,
125125
&'static [(T, &'static str)],
126126
);
127-
impl<'a, T: 'static + Eq, U: 'static + Serialize> Serialize for TriggerMap<'a, T, U> {
127+
impl<T: 'static + Eq, U: 'static + Serialize> Serialize for TriggerMap<'_, T, U> {
128128
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
129129
let mut map = serializer.serialize_map(Some(self.0.len()))?;
130130
for (key, value) in self.0 {

frontend/desktop/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static HOME: LazyLock<Option<PathBuf>> =
111111

112112
struct HomePathBufVisitor;
113113

114-
impl<'de> serde::de::Visitor<'de> for HomePathBufVisitor {
114+
impl serde::de::Visitor<'_> for HomePathBufVisitor {
115115
type Value = HomePathBuf;
116116

117117
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {

render/wgpu-3d/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(portable_simd, maybe_uninit_uninit_array, new_zeroed_alloc)]
22
#![warn(clippy::all)]
3+
#![allow(clippy::manual_div_ceil)]
34

45
mod data;
56
pub use data::{FogData, FrameData, GxData, RenderingData};

0 commit comments

Comments
 (0)