From 5488f8579251e0635510dbce21f8f57f8fd881b2 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Thu, 28 Nov 2024 19:38:44 +0100 Subject: [PATCH] warnings-- --- src/buffers.rs | 2 +- src/lib8/trig.rs | 6 +++--- src/platform/smart_leds_lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/buffers.rs b/src/buffers.rs index 1cbc900..1a0f7eb 100644 --- a/src/buffers.rs +++ b/src/buffers.rs @@ -1,7 +1,7 @@ use crate::geometry::*; use crate::render::{Surface, Shader, Surfaces}; -use std::fmt::{Debug, Formatter}; +use std::fmt::Debug; use std::rc::Rc; use std::cell::RefCell; use std::io; diff --git a/src/lib8/trig.rs b/src/lib8/trig.rs index 1797d6f..251601b 100644 --- a/src/lib8/trig.rs +++ b/src/lib8/trig.rs @@ -1,6 +1,6 @@ use num::PrimInt; -const b_m16_interleave: [u8; 8] = [0, 49, 49, 41, 90, 27, 117, 10]; +const B_M16_INTERLEAVE: [u8; 8] = [0, 49, 49, 41, 90, 27, 117, 10]; pub trait Trig8 { fn sin8(self) -> u8; @@ -22,8 +22,8 @@ impl Trig8 for u8 { let section: u8 = offset.unsigned_shr(4); let s2: u8 = section * 2; - let b: u8 = b_m16_interleave[s2 as usize]; - let m16: u8 = b_m16_interleave[s2 as usize + 1]; + let b: u8 = B_M16_INTERLEAVE[s2 as usize]; + let m16: u8 = B_M16_INTERLEAVE[s2 as usize + 1]; let mx: u8 = m16.wrapping_mul(secoffset).unsigned_shr(4); let mut y: i8 = mx as i8 + b as i8; if self & 0x80 != 0 { diff --git a/src/platform/smart_leds_lib.rs b/src/platform/smart_leds_lib.rs index 9f8a04b..e584a07 100644 --- a/src/platform/smart_leds_lib.rs +++ b/src/platform/smart_leds_lib.rs @@ -162,11 +162,11 @@ pub mod rmt { pub type FastWs2812Esp32Rmt<'a> = LedPixelEsp32Rmt<'a, Rgb, LedPixelColorGrb24>; impl Fract8Ops for LedPixelColorGrb24 { - fn blend8(self, other: Self, scale: Fract8) -> Self { + fn blend8(self, _other: Self, _scale: Fract8) -> Self { self } - fn scale8(self, scale: Fract8) -> Self { + fn scale8(self, _scale: Fract8) -> Self { self } }