add missing unchecked cast annotations

This commit is contained in:
Christophe Beyls 2024-05-05 17:18:54 +02:00
parent 55a451558a
commit 96c719a17b
2 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,7 @@ class ComposeAutoCompleteAdapter(
return filterResults
}
@Suppress("UNCHECKED_CAST")
override fun publishResults(constraint: CharSequence?, results: FilterResults) {
if (results.count > 0) {
resultList = results.values as List<AutocompleteResult>

View File

@ -135,6 +135,7 @@ class SpanUtilsTest {
spans.add(BoundedSpan(what, start, end))
}
@Suppress("UNCHECKED_CAST")
override fun <T : Any> getSpans(start: Int, end: Int, type: Class<T>): Array<T> {
return spans.filter { it.start >= start && it.end <= end && type.isInstance(it.span) }
.map { it.span }