diff --git a/codec/h265/lex_test.go b/codec/h265/lex_test.go index 4ed57c12..9f725bb9 100644 --- a/codec/h265/lex_test.go +++ b/codec/h265/lex_test.go @@ -28,7 +28,6 @@ LICENSE package h265 import ( - "errors" "io" "testing" ) @@ -248,8 +247,8 @@ func TestLex(t *testing.T) { r := &rtpReader{packets: test.packets} d := &destination{} err := NewLexer(test.donl).Lex(d, r, 0) - switch { - case err == nil || errors.Is(err, io.EOF): // Do nothing + switch err { + case nil, io.EOF: // Do nothing default: t.Fatalf("error lexing: %v\n", err) } diff --git a/revid/revid.go b/revid/revid.go index d563cc8c..aa2139fb 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -849,9 +849,9 @@ func (r *Revid) Update(vars map[string]string) error { func (r *Revid) processFrom(read io.Reader, delay time.Duration) { err := r.lexTo(r.filters[0], read, delay) r.cfg.Logger.Log(logger.Debug, pkg+"finished lexing") - switch { - case err == nil: // Do nothing. - case errors.Is(err, io.EOF): // TODO: handle this depending on loop mode. + switch err { + case nil: // Do nothing. + case io.EOF: // TODO: handle this depending on loop mode. default: r.err <- err }