From 43b037171c65335090f11f7870b3d3a3729ff4a4 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sat, 18 Mar 2017 23:18:01 -0700 Subject: [PATCH] Reformat. --- .../kotlin/com/beust/kobalt/internal/ActorUtils.kt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/ActorUtils.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/ActorUtils.kt index 42aac9e2..e9b315a5 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/ActorUtils.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/ActorUtils.kt @@ -1,7 +1,6 @@ package com.beust.kobalt.internal import com.beust.kobalt.api.IProjectAffinity -import com.beust.kobalt.api.ISimpleAffinity import com.beust.kobalt.api.KobaltContext import com.beust.kobalt.api.Project @@ -11,19 +10,13 @@ class ActorUtils { * Return the plug-in actor with the highest affinity. */ fun selectAffinityActor(project: Project, context: KobaltContext, actors: List) - = actors.maxBy { it.affinity(project, context) } + = actors.maxBy { it.affinity(project, context) } /** * Return all the plug-in actors with a non zero affinity sorted from the highest to the lowest. */ fun selectAffinityActors(project: Project, context: KobaltContext, actors: List) = actors.filter { it.affinity(project, context) > 0 } - .sortedByDescending { it.affinity(project, context) } - - /** - * Return the plug-in actor with the highest affinity. - */ - fun , A> selectAffinityActor(actors: List, arg: A) = actors.maxBy { it.affinity(arg) } + .sortedByDescending { it.affinity(project, context) } } - }