Shea Leffler

Results 44 comments of Shea Leffler
trafficstars

I'll note that `BTreeMap` doesn't have `reserve`/`with_capacity`, so there is precedent for leaving it out.

`append` wouldn't be hard to implement in the same vein as `BTreeMap`, since a trie is inherently sorted. The same approach could be taken - create a "merged" iterator from...

`drain` is an interesting one for a trie. The `drain` method on `Vec` allows for a *range* to be drained - the `drain` method on `HashMap` drains the entire `HashMap`;...

Storing `[u8]` in a node can only be done by some sort of heap indirection (minus `small_vec` and similar optimizations.) Using `ToOwned`/`Borrow` escapes the need for any such thing when...

In addition, `Trie` is (despite having a byte slice interface) effectively a key-value map. I don't like the idea of allowing users to insert keys of multiple different types into...

It does not ring true for me that cloning the string is necessary. It's been a while since I looked at this code *but* `Borrow` should allow you to pass...

Mm, I see your problem. This does not need to be solved by removing the `K` parameter (and I am immediately against that solution, I think it destroys part of...

If these keys will never be removed, and it is acceptable to keep their memory for the lifetime of your binary, I believe there are libraries which can be used...

I like the idea of a `StringTrie`, but I prefer the `AsKey` method. I don't like `AsRef` so much because it implies that you're in a way *converting* something to...

@tapeinosyne sorry for the late response! I have to admit that it never crossed my mind when I first wrote this that the equality/ordering between keys is strictly "bytewise" -...