Skip to content

Commit

Permalink
Remove unnecessary lambda from 'first(predicate)' error message (#4220)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luceium authored Sep 19, 2024
1 parent 608dccd commit cf4fcd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kotlinx-coroutines-core/common/src/flow/terminal/Reduce.kt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public suspend fun <T> Flow<T>.first(predicate: suspend (T) -> Boolean): T {
true
}
}
if (result === NULL) throw NoSuchElementException("Expected at least one element matching the predicate $predicate")
if (result === NULL) throw NoSuchElementException("Expected at least one element matching the predicate")
return result as T
}

Expand Down

0 comments on commit cf4fcd1

Please sign in to comment.