-
Notifications
You must be signed in to change notification settings - Fork 22
.push() chokes on empty word? #45
Copy link
Copy link
Open
Description
Hi, sorry I'm just posting this quickly as I ran into this, I can probably re-create/add more details if you want
I believe that I'm accidentally currently pushing an empty word (eg "") when using map::TrieBuilder to construct a map::Trie
And then it looks like that is causing a panic at this line: https://github.com/laysakura/trie-rs/blob/9fdacbb/src/internal_data_structure/naive_trie/naive_trie_impl.rs#L50
This is just a guess right now as I looked at the source code of that method since it is maybe currently assuming that it goes through the for loop at least once (and conceptually it I'm guessing makes no sense to try and push an empty word into a trie)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels