From 0401a075076968778044cde68b6d6f58072a2751 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Wed, 14 Jan 2015 23:00:00 +0000 Subject: [PATCH] Change existingBlocks map type --- internal/model/rwfolder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/model/rwfolder.go b/internal/model/rwfolder.go index 332b7bec9..983eed391 100644 --- a/internal/model/rwfolder.go +++ b/internal/model/rwfolder.go @@ -708,9 +708,9 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks tempCopyBlocks, _ := scanner.BlockDiff(tempBlocks, file.Blocks) // 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 { - existingBlocks[block.String()] = true + existingBlocks[block.String()] = struct{}{} } // Since the blocks are already there, we don't need to get them.