summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2022-05-30 13:59:23 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2022-05-30 13:59:23 -0400
commit87f2add952791fcc73b8225dffa2a3f6d6882ab4 (patch)
tree9d41c7ed5268057eb81bf25abd70529e21e5210c
parentd62144151dc10d945d376e64dd654a82b421b0bd (diff)
fix some clippy
-rw-r--r--src/commands/show_tasks.rs2
-rw-r--r--src/event/process_event.rs2
-rw-r--r--src/ui/widgets/tui_help.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/show_tasks.rs b/src/commands/show_tasks.rs
index a1acd23..ae2a43a 100644
--- a/src/commands/show_tasks.rs
+++ b/src/commands/show_tasks.rs
@@ -34,7 +34,7 @@ pub fn show_tasks(
},
Some(CommandKeybind::CompositeKeybind(m)) => {
let cmd =
- process_event::get_input_while_composite(backend, context, &m);
+ process_event::get_input_while_composite(backend, context, m);
if let Some(command) = cmd {
match command {
diff --git a/src/event/process_event.rs b/src/event/process_event.rs
index 0b7ed8d..aa4cb24 100644
--- a/src/event/process_event.rs
+++ b/src/event/process_event.rs
@@ -37,7 +37,7 @@ pub fn get_input_while_composite<'a>(
Event::Key(Key::Esc) => return None,
event => match keymap.get(&event) {
Some(CommandKeybind::SimpleKeybind(s)) => {
- return Some(&s);
+ return Some(s);
}
Some(CommandKeybind::CompositeKeybind(m)) => {
keymap = m;
diff --git a/src/ui/widgets/tui_help.rs b/src/ui/widgets/tui_help.rs
index b31c5b3..1cec5f6 100644
--- a/src/ui/widgets/tui_help.rs
+++ b/src/ui/widgets/tui_help.rs
@@ -125,7 +125,7 @@ pub fn get_raw_keymap_table<'a>(
let (command, comment) = match bind {
CommandKeybind::SimpleKeybind(command) => (format!("{}", command), command.comment()),
CommandKeybind::CompositeKeybind(sub_keymap) => {
- let mut sub_rows = get_raw_keymap_table(&sub_keymap, "", sort_by);
+ let mut sub_rows = get_raw_keymap_table(sub_keymap, "", sort_by);
for _ in 0..sub_rows.len() {
let mut sub_row = sub_rows.pop().unwrap();
sub_row[0] = key.clone() + &sub_row[0];