diff --git a/src/trie.c b/src/trie.c index cfb84e6..e85e9dc 100644 --- a/src/trie.c +++ b/src/trie.c @@ -134,15 +134,6 @@ typedef struct searchresult { SearchResult trie_search_node(Trie *trie, const char *key) { SearchResult out = {NULL, NULL}; - // Edge case for empty string - if (key[0] == DELIMITER) { - if (trie->root->represents) { - out.child = trie->root; - } - - return out; - } - size_t i = 0; size_t offset; TrieNode **node_ptr = &(trie->root); @@ -229,18 +220,6 @@ Entry *trie_search(Trie *trie, const char *key) { */ bool trie_add_no_lock(Trie *trie, const char *string, Entry *entry) { - // Edge case for empty string - if (string[0] == DELIMITER) { - if (trie->root->represents) { - return false; - } - - trie->root->represents = true; - trie->size++; - - return true; - } - size_t i = 0; uint8_t offset; TrieNode **node_ptr = &(trie->root);