From a7780712d8c1cb55de03dc1051a97193a7c91c9c Mon Sep 17 00:00:00 2001 From: Franco Colmenarez Date: Mon, 25 Dec 2023 19:58:52 -0500 Subject: [PATCH] clippy --- snes-frontend/src/emu_state/debug_options.rs | 2 +- snes-frontend/src/emu_ui/debug/common.rs | 4 ++-- snes-frontend/src/emu_ui/debug/ppu.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/snes-frontend/src/emu_state/debug_options.rs b/snes-frontend/src/emu_state/debug_options.rs index aa97e47..0793c0d 100644 --- a/snes-frontend/src/emu_state/debug_options.rs +++ b/snes-frontend/src/emu_state/debug_options.rs @@ -81,7 +81,7 @@ impl BgDebug { pub fn new(background: PPUBg) -> Self { Self { is_enabled: false, - background: background, + background, bg_framebuffer: vec![0x00; MAX_BG_WIDTH * MAX_BG_HEIGHT * 4], // 8x8 pixels, 16x8 characters char_framebuffer: vec![0x00; 8 * 8 * 16 * 8 * 4], diff --git a/snes-frontend/src/emu_ui/debug/common.rs b/snes-frontend/src/emu_ui/debug/common.rs index 90ddd9e..90b93d4 100644 --- a/snes-frontend/src/emu_ui/debug/common.rs +++ b/snes-frontend/src/emu_ui/debug/common.rs @@ -7,7 +7,7 @@ pub fn sanitize_input(input: &mut String, is_page: bool) { } let trimmed_input = input.trim_start_matches("0x"); *input = match is_page { - true => format!("{:02X}", u8::from_str_radix(&trimmed_input, 16).unwrap()), - false => format!("{:04X}", u16::from_str_radix(&trimmed_input, 16).unwrap()), + true => format!("{:02X}", u8::from_str_radix(trimmed_input, 16).unwrap()), + false => format!("{:04X}", u16::from_str_radix(trimmed_input, 16).unwrap()), } } diff --git a/snes-frontend/src/emu_ui/debug/ppu.rs b/snes-frontend/src/emu_ui/debug/ppu.rs index 4492801..afd2a72 100644 --- a/snes-frontend/src/emu_ui/debug/ppu.rs +++ b/snes-frontend/src/emu_ui/debug/ppu.rs @@ -1,7 +1,7 @@ use eframe::egui; use snes_core::ppu::registers::PPURegisters; -use crate::emu_state::debug_options::{PPUDebugControlOptions, BgDebug}; +use crate::emu_state::debug_options::PPUDebugControlOptions; use crate::emu_ui::debug::common::sanitize_input;