This commit is contained in:
Christian Zangl 2024-08-19 20:42:42 +02:00
parent 36bea4fdb7
commit 16f38a9929
No known key found for this signature in database
GPG Key ID: 6D468AC36E2A4B3D
3 changed files with 6 additions and 6 deletions

View File

@ -72,8 +72,8 @@ type Main struct {
progress Progress
total int
termWidth int
fps *RateCalc
bps *RateCalc
fps *util.RateCalc
bps *util.RateCalc
}
func (m *Main) log(text string) {
@ -331,8 +331,8 @@ func main() {
m := &Main{
logger: log.New(io.Discard, "", 0),
termWidth: termWidth,
fps: NewRateCalc(time.Second, (termWidth-70)/2),
bps: NewRateCalc(time.Second, (termWidth-70)/2),
fps: util.NewRateCalc(time.Second, (termWidth-70)/2),
bps: util.NewRateCalc(time.Second, (termWidth-70)/2),
}
m.run()
}

View File

@ -1,4 +1,4 @@
package main
package util
import (
"time"

View File

@ -225,7 +225,7 @@ func (i *Index) load() error {
}
text := data.IdxRaw
if data.IdxHash != HashMd5(text) {
// old versions may have save the JSON encoded with extra spaces
// old versions may have saved the JSON encoded with extra spaces
text, _ = json.Marshal(data.IdxRaw)
} else {
}