aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorPhilipp Mildenberger2023-03-27 23:33:55 +0000
committerGitHub2023-03-27 23:33:55 +0000
commit198ff2c3f9c56afe4649cc0ecbb09ded5fd4a7c7 (patch)
tree5e896645a77ce94046ae39dbe868e6574d663a93 /helix-term
parent5323020c3f02b178f2b6807f13d89bf7f40d3cce (diff)
Fix clippy lints (#6454)
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 4a7b7883..2f41a2dc 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -501,7 +501,7 @@ impl std::str::FromStr for MappableCommand {
fn from_str(s: &str) -> Result<Self, Self::Err> {
if let Some(suffix) = s.strip_prefix(':') {
- let mut typable_command = suffix.split(' ').into_iter().map(|arg| arg.trim());
+ let mut typable_command = suffix.split(' ').map(|arg| arg.trim());
let name = typable_command
.next()
.ok_or_else(|| anyhow!("Expected typable command name"))?;
@@ -1470,7 +1470,7 @@ pub fn scroll(cx: &mut Context, offset: usize, direction: Direction) {
let cursor = range.cursor(text);
let height = view.inner_height();
- let scrolloff = config.scrolloff.min(height.saturating_sub(1) as usize / 2);
+ let scrolloff = config.scrolloff.min(height.saturating_sub(1) / 2);
let offset = match direction {
Forward => offset as isize,
Backward => -(offset as isize),