Update journal.go

This commit is contained in:
splinter 2026-02-08 21:53:33 +01:00 committed by GitHub
parent 777265620d
commit 630482a25c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -137,9 +137,9 @@ func (j *journal) length() int {
// copy returns a deep-copied journal. // copy returns a deep-copied journal.
func (j *journal) copy() *journal { func (j *journal) copy() *journal {
entries := make([]journalEntry, 0, j.length()) entries := make([]journalEntry, j.length())
for i := 0; i < j.length(); i++ { for i := 0; i < j.length(); i++ {
entries = append(entries, j.entries[i].copy()) entries[i] = j.entries[i].copy()
} }
return &journal{ return &journal{
entries: entries, entries: entries,