From: David ‘Bombe’ Roden Date: Sat, 2 Nov 2019 23:51:08 +0000 (+0100) Subject: ♻️ Kotlinize expression X-Git-Tag: v81^2~64 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=fe5a065f7f84ab92937b5cb5a7978dec16677e09 ♻️ Kotlinize expression --- diff --git a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityLoader.kt b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityLoader.kt index 3fa87ba..b40484e 100644 --- a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityLoader.kt +++ b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityLoader.kt @@ -49,7 +49,7 @@ class IdentityLoader @Inject constructor(private val webOfTrustConnector: WebOfT } private fun OwnIdentity.doesNotHaveCorrectContext() = - context != null && !hasContext(context.context) + context?.let { it.context !in contexts } ?: false private fun time(logMessage: (Stopwatch, Collection) -> String, loader: () -> Collection): Collection = Stopwatch.createStarted().let { stopwatch ->