]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix handling of infohash as hex in Torrent.String
authorMatt Joiner <anacrolix@gmail.com>
Sat, 1 Jul 2017 06:02:06 +0000 (16:02 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 1 Jul 2017 06:02:06 +0000 (16:02 +1000)
t.go

diff --git a/t.go b/t.go
index 3fe2ae79ad37afaa453ddf8c25fb5eae34cce6d3..abd9d354e3d110d640b89e6b2b1e31a6cef84dc1 100644 (file)
--- a/t.go
+++ b/t.go
@@ -1,7 +1,6 @@
 package torrent
 
 import (
-       "fmt"
        "strings"
 
        "github.com/anacrolix/missinggo/pubsub"
@@ -200,7 +199,7 @@ func (t *Torrent) DownloadAll() {
 func (t *Torrent) String() string {
        s := t.name()
        if s == "" {
-               s = fmt.Sprintf("%x", t.infoHash)
+               s = t.infoHash.HexString()
        }
        return s
 }