fixed excluding logic - now it works

This commit is contained in:
Daniel 2023-02-03 19:01:03 +01:00
parent ae0e8f6ebc
commit 61dcdb6e55
2 changed files with 25 additions and 6 deletions

View file

@ -22,11 +22,10 @@ impl FileSink {
}
impl Open for FileSink {
// use the unwrap_or_else method instead of the if let statement to handle the absence of a path value
fn open(path: Option<String>, _audio_format: AudioFormat) -> Self {
let file = path.unwrap_or_else(|| panic!());
let file_path = path.unwrap_or_else(|| panic!());
FileSink {
sink: file,
sink: file_path,
content: Vec::new(),
metadata: None
}