From 8530cb3f2d3ec7549413b1355ca9c5376105a591 Mon Sep 17 00:00:00 2001 From: Veyndan Stuart Date: Mon, 18 Sep 2023 12:55:02 +0200 Subject: [PATCH] Remove useless cast Reduces the number of warnings when doing a gradle build. --- .../kotlin/app/cash/redwood/treehouse/ChangeListRenderer.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/ChangeListRenderer.kt b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/ChangeListRenderer.kt index 1d95ca8f81..92010f07a6 100644 --- a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/ChangeListRenderer.kt +++ b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/ChangeListRenderer.kt @@ -19,7 +19,6 @@ import app.cash.redwood.protocol.EventSink import app.cash.redwood.protocol.SnapshotChangeList import app.cash.redwood.protocol.widget.ProtocolBridge import app.cash.redwood.protocol.widget.ProtocolMismatchHandler -import app.cash.redwood.protocol.widget.ProtocolNode import kotlinx.serialization.json.Json /** @@ -35,7 +34,6 @@ public class ChangeListRenderer( throw IllegalStateException("unexpected event: $event") } - @Suppress("UNCHECKED_CAST") public fun render( view: TreehouseView, changeList: SnapshotChangeList, @@ -46,7 +44,7 @@ public class ChangeListRenderer( factory = view.widgetSystem.widgetFactory( json, ProtocolMismatchHandler.Throwing, - ) as ProtocolNode.Factory, + ), eventSink = refuseAllEvents, ) bridge.sendChanges(changeList.changes)