Cleanup: apply "Convert lambda to reference"
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ abstract class DeclarationLookupObjectImpl(
|
||||
return if (descriptor != null)
|
||||
descriptor.importableFqName
|
||||
else
|
||||
(psiElement as? PsiClass)?.qualifiedName?.let { FqName(it) }
|
||||
(psiElement as? PsiClass)?.qualifiedName?.let(::FqName)
|
||||
}
|
||||
|
||||
override fun toString() = super.toString() + " " + (descriptor ?: psiElement)
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ class InsertHandlerProvider(
|
||||
}
|
||||
}
|
||||
|
||||
originalFunction.extensionReceiverParameter?.type?.let { addPotentiallyInferred(it) }
|
||||
originalFunction.extensionReceiverParameter?.type?.let(::addPotentiallyInferred)
|
||||
originalFunction.valueParameters.forEach { addPotentiallyInferred(it.type) }
|
||||
|
||||
fun allTypeParametersPotentiallyInferred() = originalFunction.typeParameters.all { it in potentiallyInferred }
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ fun createKeywordConstructLookupElement(
|
||||
private fun detectIndent(text: CharSequence, offset: Int): String {
|
||||
return text.substring(0, offset)
|
||||
.substringAfterLast('\n')
|
||||
.takeWhile { it.isWhitespace() }
|
||||
.takeWhile(Char::isWhitespace)
|
||||
}
|
||||
|
||||
private fun String.indentLinesAfterFirst(indent: String): String {
|
||||
|
||||
+1
-1
@@ -412,7 +412,7 @@ class SmartCompletion(
|
||||
if (descriptor.modality != Modality.ABSTRACT && !descriptor.isInner) {
|
||||
descriptor.constructors
|
||||
.filter(visibilityFilter)
|
||||
.mapNotNullTo(this) { toLookupElement(it) }
|
||||
.mapNotNullTo(this, ::toLookupElement)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user