Cleanup: apply "Convert lambda to reference"
This commit is contained in:
@@ -102,7 +102,7 @@ class CodeBuilder(private val topElement: PsiElement?, private var docConverter:
|
||||
if (commentInfo.isComment) {
|
||||
// Original comment was first in line, but there's no line break before the current one
|
||||
if (!commentInfo.isPostInsert && commentInfo.isFirstNonWhitespaceElementInLine &&
|
||||
!builder.takeLastWhile { it.isWhitespace() }.contains('\n')) {
|
||||
!builder.takeLastWhile(Char::isWhitespace).contains('\n')) {
|
||||
builder.append('\n')
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ fun Converter.convertImport(anImport: PsiImportStatementBase, dumpConversion: Bo
|
||||
}
|
||||
else {
|
||||
convertImport(fqName, reference, onDemand, anImport is PsiImportStaticStatement)
|
||||
.map { Import(it) }
|
||||
.map(::Import)
|
||||
}
|
||||
return convertedImports.map { it.assignPrototype(anImport) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user