Skip to content

Commit 6079276

Browse files
committed
Remove unwraps
1 parent 5027c30 commit 6079276

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ pub fn encode(file: fs::File, wav_output: impl AsRef<path::Path>) -> Result<()>
5959
/// ```
6060
pub fn decode(file: impl AsRef<path::Path>, output: impl AsRef<path::Path>) -> Result<()> {
6161
utils::check_file_size(&fs::File::open(&file)?)?;
62-
let mut reader = hound::WavReader::open(file).unwrap();
63-
let mut writer = BufWriter::new(fs::File::create(output).unwrap());
62+
let mut reader = hound::WavReader::open(file)?;
63+
let mut writer = BufWriter::new(fs::File::create(output)?);
6464
for sample in reader.samples() {
6565
writer.write_i16(sample?)?;
6666
}

0 commit comments

Comments
 (0)