From 41e61a67b63e4d6c517005cf6f427115a664bdb5 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 29 Sep 2018 11:28:18 +0200 Subject: bug: apply an operation with a pointer to the snapshot --- bug/with_snapshot.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bug/with_snapshot.go') diff --git a/bug/with_snapshot.go b/bug/with_snapshot.go index 48274ed5..2b2439df 100644 --- a/bug/with_snapshot.go +++ b/bug/with_snapshot.go @@ -27,10 +27,8 @@ func (b *WithSnapshot) Append(op Operation) { return } - snap := op.Apply(*b.snap) - snap.Operations = append(snap.Operations, op) - - b.snap = &snap + op.Apply(b.snap) + b.snap.Operations = append(b.snap.Operations, op) } // Commit intercept Bug.Commit() to update the snapshot efficiently -- cgit