IJPL-33177 Custom dictionary is not loaded.

GitOrigin-RevId: 8983cd7d6f46d3d9f63c4a7ea65d7535712333cb
This commit is contained in:
Ilia Permiashkin
2025-07-09 11:04:40 +00:00
committed by intellij-monorepo-bot
parent 3ea18d8e26
commit 3d3fc36993
2 changed files with 4 additions and 4 deletions

View File

@@ -69,12 +69,12 @@ internal class WordListLoader(private val project: Project, private val coroutin
}
private fun readAll(loader: Loader): Set<String> {
val set = CollectionFactory.createSmallMemoryFootprintSet<String>()
val words = mutableListOf<String>()
loader.load {
ProgressManager.checkCanceled()
set.add(it)
words.add(it)
}
return set
return CollectionFactory.createSmallMemoryFootprintSet(words)
}
private fun queueWordListLoad(loader: Loader, consumer: (String, WordList) -> Unit) {

View File

@@ -14,7 +14,7 @@ internal class SimpleWordList(private val container: Set<String>) : WordList {
private val invariants = buildInvariants(container)
private fun buildInvariants(container: Set<String>): Set<String> {
val result = CollectionFactory.createSmallMemoryFootprintSet<String>()
val result = CollectionFactory.createSmallMemoryFootprintSet<String>(container.size)
for (entry in container) {
ProgressManager.checkCanceled()
result.add(entry.lowercase())