| Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The current design uses comparability of elements only to detect vacant
entries in leaf node children lists, using the zero value of the
element type as "vacant".
The reason we care about vacant entries is to avoid copy operations in
certain Slice calls. If the entries are not vacant, we have to "zero"
the entries in the returned slice to remove references to allocated
memory.
Therefore, (hackily) treating the zero value as vacant works because the
zero value for pointers is nil (it does not reference anything).
However, requiring the list elements to be comparable is inconvenient.
There shouldn't be a type bound on the elements of a general purpose
list.
With this change vacancy is kept track of with a bitset in list leaf nodes.
|
|
#23 added generic support (which is awesome) but noted the breaking change about no longer supporting `[]byte` keys due to the `Ordered` constraint.
Ideally, this library would continue to support `[]byte` keys and use a custom interface to constrain key types instead. But until that happens, the README right now is a bit surprising as it talks explicitly about supporting `[]byte` keys still but they are actually a compile error!
Here's a drive-by fix for the README for now - I _think_ I caught all the incorrect statements.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit fixes a bug in builders that caused changes to leak when
building on existing collections. The builders now only work on empty
list & map types and are marked as invalid after the underlying
collection has been retrieved from them.
|
|
|
|
Updating badges
|