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.
2 parents 9c5ba46 + 1c62b61 commit 789d9e2Copy full SHA for 789d9e2
src/renderer/mod.rs
@@ -2537,11 +2537,7 @@ impl LineAnnotation<'_> {
2537
/// Length of this annotation as displayed in the stderr output
2538
pub(crate) fn len(&self) -> usize {
2539
// Account for usize underflows
2540
- if self.end.display > self.start.display {
2541
- self.end.display - self.start.display
2542
- } else {
2543
- self.start.display - self.end.display
2544
- }
+ self.end.display.abs_diff(self.start.display)
2545
}
2546
2547
pub(crate) fn has_label(&self) -> bool {
0 commit comments