Skip to content

Commit

Permalink
package itertools API changed
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Jan 14, 2017
1 parent 5bd6868 commit a11df82
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
})
Expand Down

0 comments on commit a11df82

Please sign in to comment.