From 371faad05c4e7b563622207960f7c777596c34bc Mon Sep 17 00:00:00 2001 From: pancsta <155631569+pancsta@users.noreply.github.com> Date: Mon, 15 Jan 2024 19:53:02 +0100 Subject: [PATCH] chore: format --- pkg/machine/machine.go | 4 +--- pkg/machine/misc.go | 18 ------------------ 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/pkg/machine/machine.go b/pkg/machine/machine.go index be0242d..2b258dc 100644 --- a/pkg/machine/machine.go +++ b/pkg/machine/machine.go @@ -843,9 +843,7 @@ func (m *Machine) processStateCtxBindings() { m.activeStatesLock.Lock() var toCancel []context.CancelFunc for _, s := range deactivated { - for _, cancel := range m.indexStateCtx[s] { - toCancel = append(toCancel, cancel) - } + toCancel = append(toCancel, m.indexStateCtx[s]...) delete(m.indexStateCtx, s) } m.activeStatesLock.Unlock() diff --git a/pkg/machine/misc.go b/pkg/machine/misc.go index bf3b503..79644bc 100644 --- a/pkg/machine/misc.go +++ b/pkg/machine/misc.go @@ -308,24 +308,6 @@ func (eh *ExceptionHandler) ExceptionState(e *Event) { // utils -func isMapTrue(m map[string]bool) bool { - for _, value := range m { - if !value { - return false - } - } - return true -} - -func isMapFalse(setMap map[string]bool) bool { - for _, value := range setMap { - if value { - return false - } - } - return true -} - // j joins state names func j(states []string) string { return strings.Join(states, " ")