mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-06-19 04:03:33 +00:00
refactor(audio_player): remove unwrap in ensure_stream (#107)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5f69345d45
commit
5ae82ef28c
@@ -95,7 +95,9 @@ impl AudioPlayer {
|
||||
sink.log_on_drop(false);
|
||||
self.stream_handle = Some(sink);
|
||||
}
|
||||
Ok(self.stream_handle.as_ref().unwrap())
|
||||
self.stream_handle
|
||||
.as_ref()
|
||||
.ok_or_else(|| anyhow!("Failed to initialize stream_handle"))
|
||||
}
|
||||
|
||||
fn drop_stream(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user