aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/input.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-02-09 22:27:08 +0000
committerGitHub2023-02-09 22:27:08 +0000
commit8a3ec443f176218384db8c8610bbada9c43a6ea5 (patch)
tree5b8ada854a35d6afd530a33943bfacef338d84f8 /helix-view/src/input.rs
parent9d73a0d1128f8237eef2d4bf475496d4db081df2 (diff)
Fix new clippy lints (#5892)
Diffstat (limited to 'helix-view/src/input.rs')
-rw-r--r--helix-view/src/input.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs
index bda0520e..d8832adc 100644
--- a/helix-view/src/input.rs
+++ b/helix-view/src/input.rs
@@ -380,7 +380,7 @@ impl std::str::FromStr for KeyEvent {
let function: String = function.chars().skip(1).collect();
let function = str::parse::<u8>(&function)?;
(function > 0 && function < 13)
- .then(|| KeyCode::F(function))
+ .then_some(KeyCode::F(function))
.ok_or_else(|| anyhow!("Invalid function key '{}'", function))?
}
invalid => return Err(anyhow!("Invalid key code '{}'", invalid)),