From 1ebe1d032344bd697ce759075a646e61b192996a Mon Sep 17 00:00:00 2001 From: Kai Vogelgesang Date: Wed, 27 Oct 2021 13:57:46 +0200 Subject: [PATCH] Fix minor beat_detection warnings --- beat_detection/src/capture.rs | 2 +- beat_detection/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beat_detection/src/capture.rs b/beat_detection/src/capture.rs index 14e321b..d7056e3 100644 --- a/beat_detection/src/capture.rs +++ b/beat_detection/src/capture.rs @@ -2,7 +2,7 @@ use anyhow::{anyhow, Result}; use psimple::Simple; use pulse::context::{Context, FlagSet as ContextFlagSet}; use pulse::mainloop::standard::{IterateResult, Mainloop}; -use pulse::sample::{Format, Spec}; +use pulse::sample::Spec; use pulse::stream::Direction; use std::cell::RefCell; use std::ops::Deref; diff --git a/beat_detection/src/main.rs b/beat_detection/src/main.rs index 4c3aab1..596d724 100644 --- a/beat_detection/src/main.rs +++ b/beat_detection/src/main.rs @@ -133,7 +133,7 @@ fn main() -> Result<()> { y = (1f32 + y).log2(); - let mut y = (y - min_y) / (max_y - min_y); + let y = (y - min_y) / (max_y - min_y); ((1f32 - y) * texture_size as f32) as u32 };