1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 10:49:24 +08:00

Merge pull request #3590 from ipfs/kevina/blockservice-nit

blockservice: avoid using unnecessary continue statement
This commit is contained in:
Jeromy Johnson
2017-01-12 13:42:47 -08:00
committed by GitHub

View File

@ -112,10 +112,9 @@ func (s *blockService) AddBlocks(bs []blocks.Block) ([]*cid.Cid, error) {
if err != nil {
return nil, err
}
if has {
continue
if !has {
toput = append(toput, b)
}
toput = append(toput, b)
}
} else {
toput = bs