net/art: document return value of strideTable.delete

Updates #7781

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2023-07-24 11:14:01 -07:00 committed by Dave Anderson
parent b242e2c2cb
commit b76d8a88ae
1 changed files with 3 additions and 1 deletions

View File

@ -175,7 +175,9 @@ func (t *strideTable[T]) insert(addr uint8, prefixLen int, val *T) {
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 {
idx := prefixIndex(addr, prefixLen)
recordedIdx := t.entries[idx].prefixIndex