From 533c034747a075a5e39576582f83662821b1dbe1 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 8 Apr 2015 02:17:15 +1000 Subject: [PATCH] import pp peer_protocol in misc.go --- misc.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc.go b/misc.go index 4fbd1ff7..56d1f9c9 100644 --- a/misc.go +++ b/misc.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/anacrolix/torrent/peer_protocol" + pp "github.com/anacrolix/torrent/peer_protocol" ) const ( @@ -31,22 +31,22 @@ func (ih *InfoHash) HexString() string { return fmt.Sprintf("%x", ih[:]) } -func lastChunkSpec(pieceLength peer_protocol.Integer) (cs chunkSpec) { +func lastChunkSpec(pieceLength pp.Integer) (cs chunkSpec) { cs.Begin = (pieceLength - 1) / chunkSize * chunkSize cs.Length = pieceLength - cs.Begin return } type chunkSpec struct { - Begin, Length peer_protocol.Integer + Begin, Length pp.Integer } type request struct { - Index peer_protocol.Integer + Index pp.Integer chunkSpec } -func newRequest(index, begin, length peer_protocol.Integer) request { +func newRequest(index, begin, length pp.Integer) request { return request{index, chunkSpec{begin, length}} } -- 2.48.1