MCPcopy Create free account
hub / github.com/cortexproject/cortex / Swap

Method Swap

pkg/util/priority_queue.go:29–29  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

27func (q queue) Len() int { return len(q) }
28func (q queue) Less(i, j int) bool { return q[i].Priority() > q[j].Priority() }
29func (q queue) Swap(i, j int) { q[i], q[j] = q[j], q[i] }
30
31// Push and Pop use pointer receivers because they modify the slice's length,
32// not just its contents.

Callers 1

TickMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected