mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-17 18:45:13 +00:00
chore(stdiscosrv): reduce unnecessary allocations in merge
This commit is contained in:
parent
77f7778292
commit
822b6ac36b
@ -350,7 +350,7 @@ func merge(a, b DatabaseRecord) DatabaseRecord {
|
||||
}
|
||||
|
||||
res := DatabaseRecord{
|
||||
Addresses: make([]DatabaseAddress, 0, len(a.Addresses)+len(b.Addresses)),
|
||||
Addresses: make([]DatabaseAddress, 0, max(len(a.Addresses), len(b.Addresses))),
|
||||
Seen: a.Seen,
|
||||
}
|
||||
if b.Seen > a.Seen {
|
||||
|
Loading…
Reference in New Issue
Block a user