Thank you for making this project and making it available. I added a key-value trie in the map module. I have seen others add this functionality with a whole sale reimplementation. This patch differs in that it doesn't change the original code; it really only adds a facade on top of the existing trie implementation in a separate module. It uses a private struct KeyValue<K,V>(K, V) pair where only the key is used for Eq and Ord.
In addition, I added a is_prefix() function. It's merely to avoid an allocation when all one wants is to know whether the given query is a prefix.
Thank you for making this project and making it available. I added a key-value trie in the map module. I have seen others add this functionality with a whole sale reimplementation. This patch differs in that it doesn't change the original code; it really only adds a facade on top of the existing trie implementation in a separate module. It uses a private struct
KeyValue<K,V>(K, V)
pair where only the key is used forEq
andOrd
.In addition, I added a
is_prefix()
function. It's merely to avoid an allocation when all one wants is to know whether the givenquery
is a prefix.I added some docs to the public functions.
I did not bump any version numbers.