Skip to content

Commit 286060d

Browse files
Merge pull request #1372 from square/zachklipp/remove-valueclass
Make RenderingProduced not a value class.
2 parents 521c135 + 4ce2948 commit 286060d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

workflow-runtime/api/workflow-runtime.api

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,24 +89,27 @@ public final class com/squareup/workflow1/WorkflowInterceptor$RenderContextInter
8989

9090
public final class com/squareup/workflow1/WorkflowInterceptor$RenderPassSkipped : com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {
9191
public static final field INSTANCE Lcom/squareup/workflow1/WorkflowInterceptor$RenderPassSkipped;
92+
public fun equals (Ljava/lang/Object;)Z
93+
public fun hashCode ()I
94+
public fun toString ()Ljava/lang/String;
9295
}
9396

9497
public final class com/squareup/workflow1/WorkflowInterceptor$RenderingConflated : com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {
9598
public static final field INSTANCE Lcom/squareup/workflow1/WorkflowInterceptor$RenderingConflated;
99+
public fun equals (Ljava/lang/Object;)Z
100+
public fun hashCode ()I
101+
public fun toString ()Ljava/lang/String;
96102
}
97103

98104
public final class com/squareup/workflow1/WorkflowInterceptor$RenderingProduced : com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {
99-
public static final synthetic fun box-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;
100-
public static fun constructor-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)Lcom/squareup/workflow1/RenderingAndSnapshot;
105+
public fun <init> (Lcom/squareup/workflow1/RenderingAndSnapshot;)V
106+
public final fun component1 ()Lcom/squareup/workflow1/RenderingAndSnapshot;
107+
public final fun copy (Lcom/squareup/workflow1/RenderingAndSnapshot;)Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;
108+
public static synthetic fun copy$default (Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;Lcom/squareup/workflow1/RenderingAndSnapshot;ILjava/lang/Object;)Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;
101109
public fun equals (Ljava/lang/Object;)Z
102-
public static fun equals-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;Ljava/lang/Object;)Z
103-
public static final fun equals-impl0 (Lcom/squareup/workflow1/RenderingAndSnapshot;Lcom/squareup/workflow1/RenderingAndSnapshot;)Z
104110
public final fun getRenderingAndSnapshot ()Lcom/squareup/workflow1/RenderingAndSnapshot;
105111
public fun hashCode ()I
106-
public static fun hashCode-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)I
107112
public fun toString ()Ljava/lang/String;
108-
public static fun toString-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)Ljava/lang/String;
109-
public final synthetic fun unbox-impl ()Lcom/squareup/workflow1/RenderingAndSnapshot;
110113
}
111114

112115
public abstract interface class com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {

workflow-runtime/src/commonMain/kotlin/com/squareup/workflow1/WorkflowInterceptor.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import kotlinx.coroutines.CoroutineScope
66
import kotlinx.coroutines.Job
77
import kotlin.coroutines.CoroutineContext
88
import kotlin.coroutines.coroutineContext
9-
import kotlin.jvm.JvmInline
109
import kotlin.reflect.KType
1110

1211
/**
@@ -172,22 +171,21 @@ public interface WorkflowInterceptor {
172171
* A render pass has been skipped by an optimization, multiple actions are applied before
173172
* the runtime produces a rendering.
174173
*/
175-
public object RenderPassSkipped : RuntimeUpdate
174+
public data object RenderPassSkipped : RuntimeUpdate
176175

177176
/**
178177
* The runtime skipped producing a rendering, conflating it to the next rendering after the next
179178
* render pass.
180179
*/
181-
public object RenderingConflated : RuntimeUpdate
180+
public data object RenderingConflated : RuntimeUpdate
182181

183182
/**
184183
* This runtime has produced a new rendering after at least one render pass.
185184
*
186185
* @param renderingAndSnapshot This is the rendering and snapshot that was passed out of the
187186
* Workflow runtime.
188187
*/
189-
@JvmInline
190-
public value class RenderingProduced<R>(
188+
public data class RenderingProduced<R>(
191189
public val renderingAndSnapshot: RenderingAndSnapshot<R>
192190
) : RuntimeUpdate
193191

0 commit comments

Comments
 (0)