assert.InEpsilonSlice: remove redundant check

Remove check of actual's kind redundant with Type()'s check.
pull/1483/head
Olivier Mengué 2023-10-10 03:40:29 +02:00
parent f728d3c50f
commit 8fd5aae061
1 changed files with 2 additions and 3 deletions

View File

@ -1474,9 +1474,8 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
expectedSlice := reflect.ValueOf(expected)
actualSlice := reflect.ValueOf(actual)
if expectedSlice.Type().Kind() != reflect.Slice ||
actualSlice.Type().Kind() != reflect.Slice {
return Fail(t, "Parameters must be slice", msgAndArgs...)
if expectedSlice.Type().Kind() != reflect.Slice {
return Fail(t, "Expected value must be slice", msgAndArgs...)
}
expectedLen := expectedSlice.Len()