package itertools API changed

This commit is contained in:
Matt Joiner 2017-01-14 20:39:48 +11:00
parent 5bd6868cc8
commit a11df82349
1 changed files with 2 additions and 3 deletions

View File

@ -18,9 +18,8 @@ import (
"github.com/anacrolix/missinggo"
"github.com/anacrolix/missinggo/bitmap"
"github.com/anacrolix/missinggo/itertools"
"github.com/anacrolix/missinggo/iter"
"github.com/anacrolix/missinggo/prioritybitmap"
"github.com/bradfitz/iter"
"github.com/anacrolix/torrent/bencode"
pp "github.com/anacrolix/torrent/peer_protocol"
@ -521,7 +520,7 @@ func (c *connection) requestPiecePendingChunks(piece int) (again bool) {
return true
}
chunkIndices := c.t.pieces[piece].undirtiedChunkIndices().ToSortedSlice()
return itertools.ForPerm(len(chunkIndices), func(i int) bool {
return iter.ForPerm(len(chunkIndices), func(i int) bool {
req := request{pp.Integer(piece), c.t.chunkIndexSpec(chunkIndices[i], piece)}
return c.Request(req)
})