Skip to content

Commit

Permalink
remove copy
Browse files Browse the repository at this point in the history
  • Loading branch information
cromwellian committed Sep 18, 2020
1 parent 7ce3b56 commit b76b53e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions java/arcs/core/host/ArcState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ data class ParticleState private constructor(val state: State, val cause: Except

/** Creates [ParticleState] from serialized [toString] representation. */
fun fromString(serializedState: String) = serializedState.split('|', limit = 2).let {
ParticleState(State.valueOf(it[0])).copy(
cause = if (it.size == 2) DeserializedException(it[1]) else null
ParticleState(
State.valueOf(it[0]),
if (it.size == 2) DeserializedException(it[1]) else null
)
}

Expand Down

0 comments on commit b76b53e

Please sign in to comment.