We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0e7a0f commit 373a154Copy full SHA for 373a154
src/handlers/graphical.rs
@@ -1041,6 +1041,8 @@ impl GraphicalReportHandler {
1041
let vbar_offset = (start + end) / 2;
1042
let num_left = vbar_offset - start;
1043
let num_right = end - vbar_offset - 1;
1044
+ // Throws `Formatting argument out of range` when width is above u16::MAX.
1045
+ let width = start.saturating_sub(highest).min(u16::MAX as usize);
1046
underlines.push_str(
1047
&format!(
1048
"{:width$}{}{}{}",
@@ -1054,7 +1056,6 @@ impl GraphicalReportHandler {
1054
1056
chars.underline
1055
1057
},
1058
chars.underline.to_string().repeat(num_right),
- width = start.saturating_sub(highest),
1059
)
1060
.style(hl.style)
1061
.to_string(),
0 commit comments