Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions log/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,11 @@
func (r *Record) AttributesLen() int {
return r.nFront + len(r.back)
}

// Clone returns a copy of the record with no shared state.

Check failure on line 146 in log/record.go

View workflow job for this annotation

GitHub Actions / lint

File is not properly formatted (gofumpt)
// The original record and the clone can both be modified without interfering with each other.
func (r *Record) Clone() Record {
res := *r
res.back = slices.Clone(r.back)
return res

Check warning on line 151 in log/record.go

View check run for this annotation

Codecov / codecov/patch

log/record.go#L148-L151

Added lines #L148 - L151 were not covered by tests
}
Loading