Skip to content

Commit f5b1a7f

Browse files
committed
New clippy fixes
1 parent 1d363ff commit f5b1a7f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/message_port.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::events::{EventHandler, EventPayload, EventType};
1010
/// Allowing messages to be sent from one port and listening out for them arriving at the other.
1111
pub struct MessagePort<'a>(&'a AudioContextRegistration);
1212

13-
impl<'a> std::fmt::Debug for MessagePort<'a> {
13+
impl std::fmt::Debug for MessagePort<'_> {
1414
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1515
f.debug_struct("MessagePort").finish_non_exhaustive()
1616
}

src/render/processor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ pub struct AudioParamValues<'a> {
207207
nodes: &'a NodeCollection,
208208
}
209209

210-
impl<'a> std::fmt::Debug for AudioParamValues<'a> {
210+
impl std::fmt::Debug for AudioParamValues<'_> {
211211
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
212212
f.debug_struct("AudioParamValues").finish_non_exhaustive()
213213
}

src/render/thread.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl RenderThread {
250250
let mut buffer = Vec::with_capacity(self.number_of_channels);
251251
buffer.resize_with(buffer.capacity(), || Vec::with_capacity(length));
252252

253-
let num_frames = (length + RENDER_QUANTUM_SIZE - 1) / RENDER_QUANTUM_SIZE;
253+
let num_frames = length.div_ceil(RENDER_QUANTUM_SIZE);
254254

255255
// Handle initial control messages
256256
self.handle_control_messages();
@@ -299,7 +299,7 @@ impl RenderThread {
299299
let mut buffer = Vec::with_capacity(self.number_of_channels);
300300
buffer.resize_with(buffer.capacity(), || Vec::with_capacity(length));
301301

302-
let num_frames = (length + RENDER_QUANTUM_SIZE - 1) / RENDER_QUANTUM_SIZE;
302+
let num_frames = length.div_ceil(RENDER_QUANTUM_SIZE);
303303

304304
// Handle addition/removal of nodes/edges
305305
self.handle_control_messages();

src/worklet.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub struct AudioParamValues<'a> {
2323
map: &'a HashMap<String, AudioParamId>,
2424
}
2525

26-
impl<'a> std::fmt::Debug for AudioParamValues<'a> {
26+
impl std::fmt::Debug for AudioParamValues<'_> {
2727
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2828
f.debug_struct("AudioParamValues").finish_non_exhaustive()
2929
}

0 commit comments

Comments
 (0)