Skip to content

Commit

Permalink
Remove redundant error check
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkKremer committed Nov 29, 2023
1 parent 02692d8 commit 97f077f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions flac/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ func Decode(r io.Reader) (beep.StreamSeekCloser, beep.Format, error) {

if err != nil {
if closer, ok := r.(io.Closer); ok {
if err != nil {
closer.Close()
}
closer.Close()
}
return nil, beep.Format{}, errors.Wrap(err, "flac")
}
Expand Down

0 comments on commit 97f077f

Please sign in to comment.