Simplify percentage calculation (#1987)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-05-12 19:29:00 +10:00
1 parent 7158e09033
commit 4666a0b875
1 file changed
+1 -2
+1 -2
View File
@@ -920,8 +920,7 @@ func (ui *ui) drawRuler(nav *nav) {
progress := []string{}
if nav.copyTotal > 0 {
percentage := int((100 * float64(nav.copyBytes)) / float64(nav.copyTotal))
progress = append(progress, fmt.Sprintf("[%d%%]", percentage))
progress = append(progress, fmt.Sprintf("[%d%%]", nav.copyBytes*100/nav.copyTotal))
}
if nav.moveTotal > 0 {