Fix handling of infohash as hex in Torrent.String

This commit is contained in:
Matt Joiner 2017-07-01 16:02:06 +10:00
parent 824441efa0
commit cd20c2df36
1 changed files with 1 additions and 2 deletions

3
t.go
View File

@ -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
}