aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/increment
diff options
context:
space:
mode:
authorPascal Kuthe2023-02-09 22:27:08 +0000
committerGitHub2023-02-09 22:27:08 +0000
commit8a3ec443f176218384db8c8610bbada9c43a6ea5 (patch)
tree5b8ada854a35d6afd530a33943bfacef338d84f8 /helix-core/src/increment
parent9d73a0d1128f8237eef2d4bf475496d4db081df2 (diff)
Fix new clippy lints (#5892)
Diffstat (limited to 'helix-core/src/increment')
-rw-r--r--helix-core/src/increment/integer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/increment/integer.rs b/helix-core/src/increment/integer.rs
index 30803e17..0dfabc0d 100644
--- a/helix-core/src/increment/integer.rs
+++ b/helix-core/src/increment/integer.rs
@@ -69,8 +69,8 @@ pub fn increment(selected_text: &str, amount: i64) -> Option<String> {
let (lower_count, upper_count): (usize, usize) =
number.chars().fold((0, 0), |(lower, upper), c| {
(
- lower + c.is_ascii_lowercase().then(|| 1).unwrap_or(0),
- upper + c.is_ascii_uppercase().then(|| 1).unwrap_or(0),
+ lower + c.is_ascii_lowercase() as usize,
+ upper + c.is_ascii_uppercase() as usize,
)
});
if upper_count > lower_count {