michaelsproul / rust_radix_trie

Fast generic radix trie implemented in Rust
https://docs.rs/radix_trie/
MIT License
184 stars 32 forks source link

feat: add slices to keys implementations #72

Open vlopes11 opened 1 year ago

vlopes11 commented 1 year ago

Prior to this commit, we provided implementations only for Vec. However, the exact same implementation can be easily extended to slices, as both types are almost transparent.

This commit introduces such implementation. It will allow the user to query a radix tree that has a key of integers as key, using a slice of integers. That is possible because the get fucntion will accept anything that the key borrows to, and vec borrows to slice natively.