From 7d383ba73269a8751aedc9e8ca0b3280935db217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 10 Oct 2023 04:18:28 +0200 Subject: [PATCH] assert.InEpsilonSlice: refactor --- assert/assertions.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assert/assertions.go b/assert/assertions.go index 28f7751..e78ac31 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -1484,9 +1484,8 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m } for i := 0; i < expectedLen; i++ { - result := InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) - if !result { - return result + if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) { + return false } }