Skip to content

Commit 789d9e2

Browse files
authored
Merge pull request #204 from Muscraft/clippy
chore: Address clippy lints
2 parents 9c5ba46 + 1c62b61 commit 789d9e2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/renderer/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -2537,11 +2537,7 @@ impl LineAnnotation<'_> {
25372537
/// Length of this annotation as displayed in the stderr output
25382538
pub(crate) fn len(&self) -> usize {
25392539
// 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-
}
2540+
self.end.display.abs_diff(self.start.display)
25452541
}
25462542

25472543
pub(crate) fn has_label(&self) -> bool {

0 commit comments

Comments
 (0)