net/art: document return value of strideTable.delete

Updates #7781

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/8701/head
David Anderson 1 year ago committed by Dave Anderson
parent b242e2c2cb
commit b76d8a88ae

@ -175,7 +175,9 @@ func (t *strideTable[T]) insert(addr uint8, prefixLen int, val *T) {
return return
} }
// delete removes the route addr/prefixLen from t. // delete removes the route addr/prefixLen from t. Returns the value
// that was associated with the deleted prefix, or nil if the prefix
// wasn't in the strideTable.
func (t *strideTable[T]) delete(addr uint8, prefixLen int) *T { func (t *strideTable[T]) delete(addr uint8, prefixLen int) *T {
idx := prefixIndex(addr, prefixLen) idx := prefixIndex(addr, prefixLen)
recordedIdx := t.entries[idx].prefixIndex recordedIdx := t.entries[idx].prefixIndex

Loading…
Cancel
Save