From b31c727f816200aca81414b842efaf7f8028c87c Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 15 Jun 2022 03:55:03 +0800 Subject: [PATCH] clean up some warnings --- services/graphics-server/src/op.rs | 2 -- services/modals/src/lib.rs | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/graphics-server/src/op.rs b/services/graphics-server/src/op.rs index bb3eb0555..84b3cc14c 100644 --- a/services/graphics-server/src/op.rs +++ b/services/graphics-server/src/op.rs @@ -654,8 +654,6 @@ pub fn tile(fb: &mut LcdFB, tile: Tile, clip: Option) { fb[fb_ln + last_word] = left_part | right_part; // set the dirty bit on the line - let old = fb[fb_ln + (LCD_WORDS_PER_LINE - 1)]; fb[fb_ln + (LCD_WORDS_PER_LINE - 1)] |= 0x1_0000; - // log::info!("dirty[{}] {:x}->{:x}", fb_ln, old, fb[fb_ln + (LCD_WORDS_PER_LINE - 1)]); } } diff --git a/services/modals/src/lib.rs b/services/modals/src/lib.rs index d665010ef..8a59660c5 100644 --- a/services/modals/src/lib.rs +++ b/services/modals/src/lib.rs @@ -196,6 +196,7 @@ impl Modals { #[cfg(feature = "ditherpunk")] const MODAL_WIDTH: u32 = 300; + #[allow(dead_code)] #[cfg(feature = "ditherpunk")] const MODAL_HEIGHT: u32 = 370; /// this blocks until the image has been dismissed. @@ -203,11 +204,11 @@ impl Modals { pub fn show_image(&self, img: &Img) -> Result<(), xous::Error> { self.lock(); // resize and/or rotate + /* let (modal_width, modal_height) = (Modals::MODAL_WIDTH as f32, Modals::MODAL_HEIGHT as f32); let (w, h, _) = img.size(); let (img_width, img_height) = (w as f32, h as f32); - /* let portrait_scale = (modal_width / img_width).min(modal_height / img_height); let landscape_scale = (modal_width / img_height).min(modal_height / img_width); let mut rotate = false; @@ -229,7 +230,7 @@ impl Modals { let (bm_width, bm_height) = bm.size(); let (bm_width, bm_height) = (bm_width as u32, bm_height as u32); */ - let mut bm = Bitmap::from(img.clone()); + let bm = Bitmap::from(img.clone()); // center image in modal /* @@ -243,7 +244,7 @@ impl Modals { if t >= tiles.len() { continue; } - let mut copy = tile.clone(); + let copy = tile.clone(); //copy.translate(center); tiles[t] = Some(copy); } @@ -259,6 +260,7 @@ impl Modals { Ok(()) } + #[allow(dead_code)] #[cfg(feature = "ditherpunk")] fn resize_image(img: Img, scale: f32) -> Img { let (w, h, _) = img.size();