Code cleanup: unnecessary local variable applied

This commit is contained in:
Mikhail Glukhikh
2017-07-20 16:10:35 +03:00
parent 202fb19cf6
commit 951e8cd91a
57 changed files with 118 additions and 203 deletions
@@ -90,7 +90,7 @@ object LambdaItems {
explicitParameterTypes: Boolean
): LookupElement {
val lookupString = LambdaSignatureTemplates.lambdaPresentation(functionType, signaturePresentation)
val lookupElement = LookupElementBuilder.create(lookupString)
return LookupElementBuilder.create(lookupString)
.withInsertHandler({ context, lookupElement ->
val offset = context.startOffset
val placeholder = "{}"
@@ -101,6 +101,5 @@ object LambdaItems {
.suppressAutoInsertion()
.assignSmartCompletionPriority(SmartCompletionItemPriority.LAMBDA)
.addTailAndNameSimilarity(functionExpectedInfos.filter { it.fuzzyType?.type == functionType })
return lookupElement
}
}
@@ -73,7 +73,7 @@ object LambdaSignatureItems {
SmartCompletionItemPriority.LAMBDA_SIGNATURE_EXPLICIT_PARAMETER_TYPES
else
SmartCompletionItemPriority.LAMBDA_SIGNATURE
val lookupElement = LookupElementBuilder.create(lookupString)
return LookupElementBuilder.create(lookupString)
.withInsertHandler({ context, lookupElement ->
val offset = context.startOffset
val placeholder = "{}"
@@ -82,6 +82,5 @@ object LambdaSignatureItems {
})
.suppressAutoInsertion()
.assignSmartCompletionPriority(priority)
return lookupElement
}
}