Signed-off-by: Jean Privat <jean@pryen.org>
redef fun []=(key, v)
do
+ if _capacity == 0 then enlarge(17) # 17 because magic in `store`
var i = index_at(key)
var c = node_at_idx(i, key)
if c != null then
do
_capacity = 0
_the_length = 0
- enlarge(0)
end
redef var keys: RemovableCollection[K] = new HashMapKeys[K, V](self) is lazy
redef fun add(item)
do
+ if _capacity == 0 then enlarge(17) # 17 because magic in `store`
var i = index_at(item)
var c = node_at_idx(i, item)
if c != null then
do
_capacity = 0
_the_length = 0
- enlarge(0)
end
# Build a list filled with the items of `coll`.