]> Sergey Matveev's repositories - btrtrc.git/commitdiff
cmd/torrent: Don't make --stats default to --debug's value
authorMatt Joiner <anacrolix@gmail.com>
Tue, 21 Sep 2021 03:06:06 +0000 (13:06 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 21 Sep 2021 03:06:06 +0000 (13:06 +1000)
cmd/torrent/main.go

index e1fa04b4067210020e96836dc23f574f806ce452..a2a34f63afee574cb5aa846e060e4c94bb0eace5 100644 (file)
@@ -178,9 +178,9 @@ type DownloadCmd struct {
        PublicIP           net.IP
        Progress           bool `default:"true"`
        PieceStates        bool
-       Quiet              bool  `help:"discard client logging"`
-       Stats              *bool `help:"print stats at termination"`
-       Dht                bool  `default:"true"`
+       Quiet              bool `help:"discard client logging"`
+       Stats              bool `help:"print stats at termination"`
+       Dht                bool `default:"true"`
 
        TcpPeers        bool `default:"true"`
        UtpPeers        bool `default:"true"`
@@ -196,10 +196,7 @@ type DownloadCmd struct {
 }
 
 func statsEnabled(flags downloadFlags) bool {
-       if flags.Stats == nil {
-               return flags.Debug
-       }
-       return *flags.Stats
+       return flags.Stats
 }
 
 func exitSignalHandlers(notify *missinggo.SynchronizedEvent) {