From dfe71a61fcd17532740788180adc49051a2bad71 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Fri, 20 Dec 2024 23:02:18 +0100 Subject: [PATCH] code: Fix clippy lnt --- src/file_model.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file_model.rs b/src/file_model.rs index 963056e..09f2580 100644 --- a/src/file_model.rs +++ b/src/file_model.rs @@ -276,7 +276,7 @@ impl LpFileModel { return IndexMap::new(); }; - let reduce = if index < n { n - index } else { 0 }; + let reduce = n.saturating_sub(index); self.imp() .files