mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-08 23:08:27 +00:00
Change existingBlocks map type
This commit is contained in:
parent
c12265499a
commit
0401a07507
@ -708,9 +708,9 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks
|
|||||||
tempCopyBlocks, _ := scanner.BlockDiff(tempBlocks, file.Blocks)
|
tempCopyBlocks, _ := scanner.BlockDiff(tempBlocks, file.Blocks)
|
||||||
|
|
||||||
// block.String() returns a string unique to the block
|
// block.String() returns a string unique to the block
|
||||||
existingBlocks := make(map[string]bool, len(tempCopyBlocks))
|
existingBlocks := make(map[string]struct{}, len(tempCopyBlocks))
|
||||||
for _, block := range tempCopyBlocks {
|
for _, block := range tempCopyBlocks {
|
||||||
existingBlocks[block.String()] = true
|
existingBlocks[block.String()] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since the blocks are already there, we don't need to get them.
|
// Since the blocks are already there, we don't need to get them.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user