Skip to content

Commit

Permalink
Fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kelpsyberry committed Nov 2, 2024
1 parent fa61f4b commit a946754
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions core/src/gpu/vram/bank_cnt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,7 @@ impl Vram {
(&mut *self.writeback.$usage.get()).fill(0);
for (region, mapped) in self.map.$usage.iter().enumerate() {
let mapped = mapped.get();
let mask = if mapped != 0
&& mapped & (mapped - 1) == 0
let mask = if mapped.is_power_of_two()
&& mapped & $mirrored_banks_mask == 0
&& self.bg_obj_updates.is_none()
{
Expand Down
3 changes: 2 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
clippy::must_use_candidate,
clippy::missing_errors_doc,
clippy::inline_always,
clippy::new_without_default
clippy::new_without_default,
clippy::manual_is_power_of_two
)]

pub extern crate emu_utils as utils;
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/input/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl Serialize for Map {
&'a HashMap<T, U>,
&'static [(T, &'static str)],
);
impl<'a, T: 'static + Eq, U: 'static + Serialize> Serialize for TriggerMap<'a, T, U> {
impl<T: 'static + Eq, U: 'static + Serialize> Serialize for TriggerMap<'_, T, U> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(self.0.len()))?;
for (key, value) in self.0 {
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static HOME: LazyLock<Option<PathBuf>> =

struct HomePathBufVisitor;

impl<'de> serde::de::Visitor<'de> for HomePathBufVisitor {
impl serde::de::Visitor<'_> for HomePathBufVisitor {
type Value = HomePathBuf;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
1 change: 1 addition & 0 deletions render/wgpu-3d/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(portable_simd, maybe_uninit_uninit_array, new_zeroed_alloc)]
#![warn(clippy::all)]
#![allow(clippy::manual_div_ceil)]

mod data;
pub use data::{FogData, FrameData, GxData, RenderingData};
Expand Down

0 comments on commit a946754

Please sign in to comment.