From 1f7bb6520535a93729acb74db54661acd55d46cc Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Wed, 10 Aug 2022 13:31:00 +0200 Subject: [PATCH] Simplify for loop --- foundation.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/foundation.go b/foundation.go index ced5b81..7520850 100644 --- a/foundation.go +++ b/foundation.go @@ -72,16 +72,12 @@ func (f *Foundation) calculateNextStep(step int) int { } i := f.currentStep - for { + for i < step { i++ if _, ok := f.interceptors[i]; ok { break } - - if step == i { - break - } } return i