From 150d71cae770598ade7e09419150f1218e961128 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Sun, 24 Sep 2017 09:18:26 -0400 Subject: Fix more style things All reported by clippy. Mostly stuff like unnecessary lifetimes or references. --- src/synth/saw.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/synth/saw.rs') diff --git a/src/synth/saw.rs b/src/synth/saw.rs index b85794d..054b3c8 100644 --- a/src/synth/saw.rs +++ b/src/synth/saw.rs @@ -19,7 +19,7 @@ impl Generator for Saw { self.phase = (self.phase + pvel * (self.buf.len() as f32)) % 1.0; &self.buf } - fn buffer<'a>(&'a self) -> &'a SampleBuffer { &self.buf } + fn buffer(&self) -> &SampleBuffer { &self.buf } fn set_buffer(&mut self, buf: SampleBuffer) -> SampleBuffer { mem::replace(&mut self.buf, buf) } @@ -30,7 +30,7 @@ pub struct SawFactory; impl GeneratorFactory for SawFactory { fn new(&self, params: &mut FactoryParameters) -> Result { Ok(Box::new(Saw { - freq: params.remove_param("freq", 0)?.as_gen()?, + freq: params.remove_param("freq", 0)?.into_gen()?, phase: params.get_param("phase", 1, &ParamValue::Float(0.0)).as_f32()?, buf: SampleBuffer::new(params.env.default_buffer_size), })) -- cgit v1.2.3-70-g09d2