Skip to content

Commit

Permalink
simplify replicated list nextDot
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgk committed Feb 6, 2024
1 parent 6ecd998 commit 7da89d4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ object ReplicatedSet {

def add(using ReplicaId)(e: E): CausalMutator = {
val dm = current.inner
val cc = context
val nextDot = cc.max(replicaId).fold(Dot(replicaId, 0))(_.advance)
val nextDot = context.nextDot(replicaId)
val v: DotSet = dm.repr.getOrElse(e, DotSet.empty)

deltaState(
Expand Down

0 comments on commit 7da89d4

Please sign in to comment.