summaryrefslogtreecommitdiffstats
path: root/src/commands
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2022-08-01 12:46:12 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2022-08-01 12:46:12 -0400
commitd2ef6d44cc09ad3e57642d5839d972d426bfff12 (patch)
treece08c189de10033bd31304a158d2a420fb1018ce /src/commands
parent7ee7a761ec62a065fcc2bde9d98b587d069b364a (diff)
cargo clippy
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/delete_files.rs4
-rw-r--r--src/commands/search.rs4
-rw-r--r--src/commands/search_fzf.rs2
-rw-r--r--src/commands/search_glob.rs2
-rw-r--r--src/commands/search_string.rs2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/delete_files.rs b/src/commands/delete_files.rs
index 987c45e..35a2dfd 100644
--- a/src/commands/delete_files.rs
+++ b/src/commands/delete_files.rs
@@ -75,7 +75,7 @@ fn _delete_selected_files(
context: &mut AppContext,
backend: &mut AppBackend,
) -> std::io::Result<()> {
- let _ = delete_files(context, backend, false)?;
+ delete_files(context, backend, false)?;
let options = context.config_ref().display_options_ref().clone();
let curr_path = context.tab_context_ref().curr_tab_ref().cwd().to_path_buf();
@@ -94,7 +94,7 @@ fn _delete_selected_files_background(
context: &mut AppContext,
backend: &mut AppBackend,
) -> std::io::Result<()> {
- let _ = delete_files(context, backend, true)?;
+ delete_files(context, backend, true)?;
let options = context.config_ref().display_options_ref().clone();
let curr_path = context.tab_context_ref().curr_tab_ref().cwd().to_path_buf();
diff --git a/src/commands/search.rs b/src/commands/search.rs
index 0d3fbdc..71beae1 100644
--- a/src/commands/search.rs
+++ b/src/commands/search.rs
@@ -17,7 +17,7 @@ pub fn search_next(context: &mut AppContext) -> JoshutoResult {
}
};
if let Some(index) = index {
- let _ = cursor_move::cursor_move(context, index);
+ cursor_move::cursor_move(context, index);
}
}
Ok(())
@@ -34,7 +34,7 @@ pub fn search_prev(context: &mut AppContext) -> JoshutoResult {
}
};
if let Some(index) = index {
- let _ = cursor_move::cursor_move(context, index);
+ cursor_move::cursor_move(context, index);
}
}
Ok(())
diff --git a/src/commands/search_fzf.rs b/src/commands/search_fzf.rs
index 056fd10..7bc0ca8 100644
--- a/src/commands/search_fzf.rs
+++ b/src/commands/search_fzf.rs
@@ -52,7 +52,7 @@ pub fn search_fzf(context: &mut AppContext, backend: &mut AppBackend) -> Joshuto
let selected_idx_str = selected.split_once(' ');
if let Some((selected_idx_str, _)) = selected_idx_str {
if let Ok(index) = selected_idx_str.parse::<usize>() {
- let _ = cursor_move::cursor_move(context, index);
+ cursor_move::cursor_move(context, index);
}
}
}
diff --git a/src/commands/search_glob.rs b/src/commands/search_glob.rs
index 61140ee..30962c1 100644
--- a/src/commands/search_glob.rs
+++ b/src/commands/search_glob.rs
@@ -42,7 +42,7 @@ pub fn search_glob(context: &mut AppContext, pattern: &str) -> JoshutoResult {
let index = search_glob_fwd(context.tab_context_ref().curr_tab_ref(), &glob);
if let Some(index) = index {
- let _ = cursor_move::cursor_move(context, index);
+ cursor_move::cursor_move(context, index);
}
context.set_search_context(SearchPattern::Glob(glob));
Ok(())
diff --git a/src/commands/search_string.rs b/src/commands/search_string.rs
index 70b0795..53d54ea 100644
--- a/src/commands/search_string.rs
+++ b/src/commands/search_string.rs
@@ -59,7 +59,7 @@ pub fn search_string(context: &mut AppContext, pattern: &str, incremental: bool)
search_string_fwd(curr_tab, pattern.as_str())
};
if let Some(index) = index {
- let _ = cursor_move::cursor_move(context, index);
+ cursor_move::cursor_move(context, index);
}
context.set_search_context(SearchPattern::String(pattern));
}