Skip to content

Commit

Permalink
core/playback: preemptively fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
photovoltex committed Dec 6, 2024
1 parent f9f7fc9 commit be81f2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/connection/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ where
Ok(message)
}

async fn read_into_accumulator<'a, 'b, T: AsyncRead + Unpin>(
connection: &'a mut T,
async fn read_into_accumulator<'b, T: AsyncRead + Unpin>(
connection: &mut T,
size: usize,
acc: &'b mut Vec<u8>,
) -> io::Result<&'b mut [u8]> {
Expand Down
2 changes: 1 addition & 1 deletion playback/src/audio_backend/rodio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fn create_sink(
},
Some(device_name) => {
host.output_devices()?
.find(|d| d.name().ok().map_or(false, |name| name == device_name)) // Ignore devices for which getting name fails
.find(|d| d.name().ok().is_some_and(|name| name == device_name)) // Ignore devices for which getting name fails
.ok_or_else(|| RodioError::DeviceNotAvailable(device_name.to_string()))?
}
None => host
Expand Down

0 comments on commit be81f2a

Please sign in to comment.