From ebd523e39c1cf25aa150b2f18045f2f3e5e51431 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 21 Sep 2021 13:06:06 +1000 Subject: [PATCH] cmd/torrent: Don't make --stats default to --debug's value --- cmd/torrent/main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index e1fa04b4..a2a34f63 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -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) { -- 2.48.1