Fixed tautological errors

err can't ever be not nil here, unless the Go language specs are changing.
pull/910/head
Christian Muehlhaeuser 2019-07-19 23:44:29 +02:00 committed by Boyan Soubachov
parent 8bb674980e
commit 08b5acc756
1 changed files with 0 additions and 6 deletions

View File

@ -918,9 +918,6 @@ func TestNoError(t *testing.T) {
// returning an empty error interface
err = func() error {
var err *customError
if err != nil {
t.Fatal("err should be nil here")
}
return err
}()
@ -955,9 +952,6 @@ func TestError(t *testing.T) {
// returning an empty error interface
err = func() error {
var err *customError
if err != nil {
t.Fatal("err should be nil here")
}
return err
}()