From 8504a96a4e830fa19e30842145efa45f61c7b8fa Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Tue, 6 Aug 2024 08:45:19 +0700 Subject: [PATCH] chore(developer): drops redundant buildFromWordList return --- developer/src/kmc-model/src/build-trie.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/developer/src/kmc-model/src/build-trie.ts b/developer/src/kmc-model/src/build-trie.ts index 76da23662f..53f4539acc 100644 --- a/developer/src/kmc-model/src/build-trie.ts +++ b/developer/src/kmc-model/src/build-trie.ts @@ -304,13 +304,12 @@ namespace Trie { * Populates the trie with the contents of an entire wordlist. * @param words a list of word and count pairs. */ - function buildFromWordList(trie: Trie, words: WordList): Trie { + function buildFromWordList(trie: Trie, words: WordList): void { for (let [wordform, weight] of Object.entries(words)) { - let key = trie.toKey(wordform); + const key = trie.toKey(wordform); addUnsorted(trie.root, { key, weight, content: wordform }, 0); } sortTrie(trie.root); - return trie; } /**