Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
gaissmai committed Feb 4, 2023
1 parent 83f20a1 commit 1bdf27c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions treap.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,13 @@ func cmpRR(a, b netip.Prefix) int {
}

// ipTooBig returns true if ip is greater than prefix last address.
// The test must be indirect since netip has no method to get the last address of the prefix.
func ipTooBig(ip netip.Addr, p netip.Prefix) bool {
if p.Contains(ip) {
return false
}
if ip.Compare(p.Addr()) > 0 {
// ... but not contained, indirect proof for tooBig
return true
}
return false
Expand Down

0 comments on commit 1bdf27c

Please sign in to comment.