From: David ‘Bombe’ Roden Date: Sun, 27 Oct 2019 16:31:51 +0000 (+0100) Subject: ♻️ Use simpler syntax to bind Node instance X-Git-Tag: v81^2~105 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9b816636b560ee54e0117cd4b01c8448ed3d3b71;p=Sone.git ♻️ Use simpler syntax to bind Node instance --- diff --git a/src/main/kotlin/net/pterodactylus/sone/main/FreenetModule.kt b/src/main/kotlin/net/pterodactylus/sone/main/FreenetModule.kt index 9fff176..fe3b3af 100644 --- a/src/main/kotlin/net/pterodactylus/sone/main/FreenetModule.kt +++ b/src/main/kotlin/net/pterodactylus/sone/main/FreenetModule.kt @@ -16,7 +16,7 @@ class FreenetModule(private val pluginRespirator: PluginRespirator) : Module { override fun configure(binder: Binder): Unit = binder.run { bind(PluginRespiratorFacade::class.java).toProvider(Provider { FredPluginRespiratorFacade(pluginRespirator) }).`in`(Singleton::class.java) - pluginRespirator.node!!.let { node -> bind(Node::class.java).toProvider(Provider { node }) } + bind(Node::class.java).toProvider(Provider { pluginRespirator.node }) bind(HighLevelSimpleClient::class.java).toProvider(Provider { pluginRespirator.hlSimpleClient!! }) bind(ToadletContainer::class.java).toProvider(Provider { pluginRespirator.toadletContainer }) bind(PageMaker::class.java).toProvider(Provider { pluginRespirator.pageMaker })