From 1c62b61c44c8384b7c891b352b0c303d0b6a992d Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Wed, 14 May 2025 12:32:39 +0200 Subject: [PATCH] chore: Address clippy lints --- src/renderer/mod.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index be2abab..de1b77d 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -2537,11 +2537,7 @@ impl LineAnnotation<'_> { /// Length of this annotation as displayed in the stderr output pub(crate) fn len(&self) -> usize { // Account for usize underflows - if self.end.display > self.start.display { - self.end.display - self.start.display - } else { - self.start.display - self.end.display - } + self.end.display.abs_diff(self.start.display) } pub(crate) fn has_label(&self) -> bool {