diff --git a/examples/sine_synth.rs b/examples/sine_synth.rs index 55967480..b459b396 100644 --- a/examples/sine_synth.rs +++ b/examples/sine_synth.rs @@ -91,7 +91,6 @@ impl Plugin for SineSynth { } } - #[allow(unknown_lints)] #[allow(unused_variables)] #[allow(clippy::single_match)] fn process_events(&mut self, events: &Events) { diff --git a/src/api.rs b/src/api.rs index 2219163c..a060bc2c 100644 --- a/src/api.rs +++ b/src/api.rs @@ -132,7 +132,6 @@ pub struct AEffect { impl AEffect { /// Return handle to Plugin object. Only works for plugins created using this library. // Supresses warning about returning a reference to a box - #[allow(unknown_lints)] #[allow(clippy::borrowed_box)] pub unsafe fn get_plugin(&mut self) -> &mut Box { //FIXME: find a way to do this without resorting to transmuting via a box diff --git a/src/host.rs b/src/host.rs index 30302168..ad298061 100644 --- a/src/host.rs +++ b/src/host.rs @@ -725,10 +725,8 @@ impl HostBuffer { /// was created for, or if the sample arrays do not all have the same length. pub fn bind<'a, I, O>(&'a mut self, input_arrays: &[I], output_arrays: &mut [O]) -> AudioBuffer<'a, T> where - I: AsRef<[T]>, - O: AsMut<[T]>, - I: 'a, - O: 'a, + I: AsRef<[T]> + 'a, + O: AsMut<[T]> + 'a, { // Check that number of desired inputs and outputs fit in allocation if input_arrays.len() > self.inputs.len() { diff --git a/src/lib.rs b/src/lib.rs index cca3c207..0e7065b0 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -187,7 +187,9 @@ pub fn main(callback: HostCallbackProc) -> *mut AEffect { // Create a Box containing a zeroed AEffect. This is transmuted into a *mut pointer so that it // can be passed into the HostCallback `wrap` method. The AEffect is then updated after the vst // object is created so that the host still contains a raw pointer to the AEffect struct. - let effect = unsafe { Box::into_raw(Box::new(mem::zeroed::())) }; + let effect = unsafe { + Box::into_raw(Box::new(mem::MaybeUninit::zeroed().assume_init())) + }; let host = HostCallback::wrap(callback, effect); if host.vst_version() == 0 { diff --git a/src/util/parameter_transfer.rs b/src/util/parameter_transfer.rs index 6420766c..fc3b52df 100644 --- a/src/util/parameter_transfer.rs +++ b/src/util/parameter_transfer.rs @@ -181,6 +181,7 @@ mod tests { assert!(transfer.iterate(true).next().is_none()); // Verify final values + #[allow(clippy::needless_range_loop)] for p in 0..PARAMETERS { assert!((0..THREADS).any(|t| (results[t][p] - values[p]).abs() < std::f32::EPSILON)); }