]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Set deferred unique actions map to nil rather than clear
authorMatt Joiner <anacrolix@gmail.com>
Tue, 5 Aug 2025 09:55:16 +0000 (19:55 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 5 Aug 2025 09:55:16 +0000 (19:55 +1000)
deferrwl.go

index 0af2e19675b2e67a3c579cb742c93be7e939d9e9..dd8011d0e10723fe9087b68c4fe64ba623f47346 100644 (file)
@@ -34,7 +34,7 @@ func (me *lockWithDeferreds) Unlock() {
                panic(fmt.Sprintf("num deferred changed while running: %v -> %v", startLen, len(me.unlockActions)))
        }
        me.unlockActions = me.unlockActions[:0]
-       clear(me.uniqueActions)
+       me.uniqueActions = nil
        me.unlocking = false
        me.internal.Unlock()
 }