MCPcopy Index your code
hub / github.com/syncthing/syncthing / Copy

Method Copy

lib/protocol/vector.go:187–191  ·  view source on GitHub ↗

Copy returns an identical vector that is not shared with v.

()

Source from the content-addressed store, hash-verified

185
186// Copy returns an identical vector that is not shared with v.
187func (v Vector) Copy() Vector {
188 nv := make([]Counter, len(v.Counters))
189 copy(nv, v.Counters)
190 return Vector{Counters: nv}
191}
192
193// Equal returns true when the two vectors are equivalent.
194func (v Vector) Equal(b Vector) bool {

Callers 1

TestCopyFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestCopyFunction · 0.76