summaryrefslogtreecommitdiff
path: root/helix-core/src/increment
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-11-04 12:01:17 +0000
committerBlaž Hrastnik2022-11-04 12:06:28 +0000
commitc2c1280f02b83a468da67d88350c199915427535 (patch)
treecd4306c1b7353bb960608e18c5633aa22c5d0204 /helix-core/src/increment
parent921d3510132b0bd89d4ac0a542371c3ae90e2e02 (diff)
Resolve a bunch of upcoming clippy lints
Diffstat (limited to 'helix-core/src/increment')
-rw-r--r--helix-core/src/increment/number.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/increment/number.rs b/helix-core/src/increment/number.rs
index 62b4a19d..91268729 100644
--- a/helix-core/src/increment/number.rs
+++ b/helix-core/src/increment/number.rs
@@ -110,8 +110,8 @@ impl<'a> Increment for NumberIncrementor<'a> {
let (lower_count, upper_count): (usize, usize) =
old_text.chars().skip(2).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 + usize::from(c.is_ascii_lowercase()),
+ upper + usize::from(c.is_ascii_uppercase()),
)
});
if upper_count > lower_count {