Skip to content

Commit c4a15c4

Browse files
committed
refactor
- fix subtract with overflow
1 parent 454e6b9 commit c4a15c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plumbing/progress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ pub fn show_progress() -> anyhow::Result<()> {
520520

521521
if let Some(width) = width {
522522
let icon_and_config_width = 55;
523-
let width_after_config = width - icon_and_config_width;
523+
let width_after_config = width.saturating_sub(icon_and_config_width);
524524
let usage = usage.to_string();
525525
let mut idx = 0;
526526
for word in usage.split(' ') {

0 commit comments

Comments
 (0)