From 060c46f90afdef6fd68e74ca87f5874c0892c24f Mon Sep 17 00:00:00 2001 From: Vladimir Bauer Date: Sun, 5 Jan 2025 22:15:16 +0500 Subject: [PATCH] minor: set sync without if --- heap_manager.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/heap_manager.go b/heap_manager.go index e74f26fb..23e24d82 100644 --- a/heap_manager.go +++ b/heap_manager.go @@ -49,9 +49,7 @@ func (m heapManager) run() { case h_push: data := req.data.(pushData) heap.Push(&bHeap, data.bar) - if !sync { - sync = data.sync - } + sync = sync || data.sync case h_sync: if sync || len != bHeap.Len() { pMatrix = make(map[int][]chan int)