From e2e608048d02cfcf22aa278248f5a50116fc68eb Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Mon, 2 Dec 2024 19:39:06 +0100 Subject: [PATCH] clippy++ --- src/animations.rs | 11 +---------- src/buffers.rs | 3 --- src/main.rs | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/animations.rs b/src/animations.rs index 22ec683..f5baf8b 100644 --- a/src/animations.rs +++ b/src/animations.rs @@ -54,15 +54,6 @@ impl Shader for ThinkingShader { } } -#[derive(Debug)] -struct GayBarberShader {} - -impl Shader for GayBarberShader { - fn draw(&self, coords: &VirtualCoordinates, frame: usize) -> RGB8 { - Hsv::new_srgb((frame as u8).wrapping_add(coords.x).wrapping_add(coords.y), 255, sin8((frame % 128) as u8)).into_rgb8() - } -} - impl IdleTask { pub fn new>(surfaces: &mut S) -> Self { IdleTask { @@ -123,7 +114,7 @@ impl TestShader { Self::SweepY => Self::SinX, Self::SinX => Self::SinY, Self::SinY => Self::Metaballs, - Self::Metaballs => Self::RGB + Self::Metaballs => Self::Red } } } diff --git a/src/buffers.rs b/src/buffers.rs index a58119d..73ce088 100644 --- a/src/buffers.rs +++ b/src/buffers.rs @@ -4,10 +4,7 @@ use crate::power::AsMilliwatts; use crate::render::{PixelView, Sample, Shader, Surface, Surfaces, HardwarePixel}; use crate::task::Task; -use std::borrow::BorrowMut; use std::fmt::Debug; -use std::rc::Rc; -use std::cell::RefCell; use std::io; use std::ops::IndexMut; diff --git a/src/main.rs b/src/main.rs index 2b21fb9..fdfa622 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,7 +33,7 @@ fn main() { let mut animations = FixedSizeScheduler::new([ Box::new(animations::IdleTask::new(&mut surfaces)), Box::new(animations::TestPattern::new(surfaces.new_surface(&Rectangle::everything()).unwrap())), - ]; + ]); let mut renderer = FixedSizeScheduler::new([Box::new(Renderer::new(output, surfaces))]);