Commit 8da2cb82 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3de84de2
......@@ -302,6 +302,11 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
}
// regular btree
bt.firstbucket, ok = t[1].(*Bucket)
if !ok {
return fmt.Errorf("first bucket: must be Bucket; got %T", t[1])
}
t, ok = t[0].(pickle.Tuple)
if !ok {
return fmt.Errorf("data: expect (...); got %T", t[0])
......@@ -310,11 +315,6 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
return fmt.Errorf("data: expect [!%%2](); got [%d]()", len(t))
}
bt.firstbucket, ok = t[1].(*Bucket)
if !ok {
return fmt.Errorf("first bucket: must be Bucket; got %T", t[1])
}
n := (len(t) + 1) / 2
bt.data = make([]zBTreeItem, 0, n)
for i, idx := 0, 0; i < n; i++ {
......
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