Commit fe364dd4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d6f15415
...@@ -528,7 +528,7 @@ type rangeSplit []*nodeInRange // key↑ ...@@ -528,7 +528,7 @@ type rangeSplit []*nodeInRange // key↑
func (rs rangeSplit) Get(k Key) *nodeInRange { func (rs rangeSplit) Get(k Key) *nodeInRange {
rnode, ok := rs.Get_(k) rnode, ok := rs.Get_(k)
if !ok { if !ok {
panicf("key %v not covered", k) panicf("key %v not covered; coverage: %s", k, rs)
} }
return rnode return rnode
} }
...@@ -544,7 +544,7 @@ func (rs rangeSplit) Get_(k Key) (rnode *nodeInRange, ok bool) { ...@@ -544,7 +544,7 @@ func (rs rangeSplit) Get_(k Key) (rnode *nodeInRange, ok bool) {
rn := rs[i] rn := rs[i]
if !(rn.lo <= k && k <= rn.hi_) { if !(rn.lo <= k && k <= rn.hi_) {
panicf("BUG: get(%v) -> %s", k, rn) panicf("BUG: get(%v) -> %s; coverage: %s", k, rn, rs)
} }
return rn, true return rn, true
...@@ -563,7 +563,7 @@ func (prs *rangeSplit) Expand(rnode *nodeInRange) (children rangeSplit) { ...@@ -563,7 +563,7 @@ func (prs *rangeSplit) Expand(rnode *nodeInRange) (children rangeSplit) {
return rnode.hi_ <= rs[i].hi_ return rnode.hi_ <= rs[i].hi_
}) })
if i == len(rs) || rs[i] != rnode { if i == len(rs) || rs[i] != rnode {
panicf("%s not in rangeSplit", rnode) panicf("%s not in rangeSplit; coverage: %s", rnode, rs)
} }
// [i].Key ≤ [i].Child.*.Key < [i+1].Key i ∈ [0, len([])) // [i].Key ≤ [i].Child.*.Key < [i+1].Key i ∈ [0, len([]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment