Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus committed Jun 1, 2024
1 parent 12e5327 commit 13f4972
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::multiple_crate_versions)]
mod structs;
mod utils;

Expand Down Expand Up @@ -52,7 +53,7 @@ fn main_loop(initial_path: String) {
if entry.filetype.should_exec() || modifier == KeyModifiers::CONTROL {
match open::that(&entry.path) {
// quit if file was opened
Ok(_) => break,
Ok(()) => break,
// else display error and open as directory
Err(_) => err(format!(
"Failed to open file \"{}\"",
Expand Down
2 changes: 1 addition & 1 deletion src/structs/prompt_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl Theme {
if cursor_pos < search_term.len() {
let split = search_term.split_at(cursor_pos);
let head = split.0.concat();
let cursor = self.fuzzy_cursor_style.apply_to(split.1.get(0).unwrap());
let cursor = self.fuzzy_cursor_style.apply_to(split.1.first().unwrap());
let tail = split.1[1..].concat();

write!(f, "{} {head}{cursor}{tail}", &self.prompt_suffix)
Expand Down

0 comments on commit 13f4972

Please sign in to comment.