Skip to content

Commit

Permalink
New clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
orottier committed Dec 1, 2024
1 parent 1d363ff commit f5b1a7f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/message_port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::events::{EventHandler, EventPayload, EventType};
/// Allowing messages to be sent from one port and listening out for them arriving at the other.
pub struct MessagePort<'a>(&'a AudioContextRegistration);

impl<'a> std::fmt::Debug for MessagePort<'a> {
impl std::fmt::Debug for MessagePort<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("MessagePort").finish_non_exhaustive()
}
Expand Down
2 changes: 1 addition & 1 deletion src/render/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ pub struct AudioParamValues<'a> {
nodes: &'a NodeCollection,
}

impl<'a> std::fmt::Debug for AudioParamValues<'a> {
impl std::fmt::Debug for AudioParamValues<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("AudioParamValues").finish_non_exhaustive()
}
Expand Down
4 changes: 2 additions & 2 deletions src/render/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl RenderThread {
let mut buffer = Vec::with_capacity(self.number_of_channels);
buffer.resize_with(buffer.capacity(), || Vec::with_capacity(length));

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

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

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

// Handle addition/removal of nodes/edges
self.handle_control_messages();
Expand Down
2 changes: 1 addition & 1 deletion src/worklet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct AudioParamValues<'a> {
map: &'a HashMap<String, AudioParamId>,
}

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

0 comments on commit f5b1a7f

Please sign in to comment.