[kotlin] Drop unused parameter from unwrap to simply rewrite

^KTIJ-32260

GitOrigin-RevId: af1f4623c5390ee2e70a22d5ca762b809b5dbc7e
This commit is contained in:
Roman Efremov
2024-11-26 11:42:26 +00:00
committed by intellij-monorepo-bot
parent 8b15cc6700
commit 816bcb1c45
@@ -499,7 +499,6 @@ private sealed class UserDataModuleContainer {
@K1ModeProjectStructureApi
fun Sequence<Result<IdeaModuleInfo>>.unwrap(
errorHandler: (String, Throwable) -> Unit,
stopOnErrors: Boolean = true
): Sequence<IdeaModuleInfo> {
val originalSequence = this
return object : Sequence<IdeaModuleInfo> {
@@ -516,9 +515,7 @@ fun Sequence<Result<IdeaModuleInfo>>.unwrap(
val error = result.exceptionOrNull()
if (error != null) {
errorHandler("Could not find correct module information", error)
if (stopOnErrors) {
iterator = null
}
iterator = null
}
return null
}