Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
cossonleo committed Oct 29, 2021
1 parent 7ee9952 commit 7f1a940
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ fn search_completions(cx: &mut Context, reg: Option<char>) -> Vec<String> {
}
})
.take(10)
.map(|item| item.clone())
.cloned()
.collect()
})
}
Expand Down
2 changes: 1 addition & 1 deletion helix-term/src/ui/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl Component for Prompt {
1,
);
let line = text.slice(range.from()..range.to()).to_string();
if line.len() > 0 {
if !line.is_empty() {
self.insert_str(line.as_str());
(self.callback_fn)(cx, &self.line, PromptEvent::Update);
}
Expand Down

0 comments on commit 7f1a940

Please sign in to comment.