From 94ba35e9ec35cb3437b8adc78e65a9b3aa02b564 Mon Sep 17 00:00:00 2001 From: David Florness Date: Sat, 20 Feb 2021 16:09:12 -0500 Subject: [PATCH] We don't need this return value to be named --- election/msg.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/election/msg.go b/election/msg.go index be99bc6..918a3f2 100644 --- a/election/msg.go +++ b/election/msg.go @@ -114,10 +114,10 @@ func (elections *ElectionsMap) SetupEventHooks(client *mautrix.Client, syncer ma } wrapper := func(f func(*event.Event) bool) func(*event.Event) bool { - return func(evt *event.Event) (success bool) { + return func(evt *event.Event) bool { if evt.Unsigned.RedactedBecause != nil { log.Debugf("event %s was redacted", evt.ID) - return + return false } eventStore.Lock() _, evtIsProcessing := eventStore.Processing[evt.ID] @@ -140,7 +140,7 @@ func (elections *ElectionsMap) SetupEventHooks(client *mautrix.Client, syncer ma eventStore.Processing[evt.ID] = struct{}{} eventStore.Unlock() } - success = f(evt) + success := f(evt) eventStore.Lock() // see EventStore doc for success explanation if success { @@ -150,7 +150,7 @@ func (elections *ElectionsMap) SetupEventHooks(client *mautrix.Client, syncer ma } delete(eventStore.Processing, evt.ID) eventStore.Unlock() - return + return success } } -- 2.38.4