diff options
author | Kasper Juul Hermansen <contact@kjuulh.io> | 2023-07-19 02:52:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 20:52:00 -0400 |
commit | a8dca77e39f01637c735b7eec2ea9bf00cbc9af3 (patch) | |
tree | 54afc3ea6e80fc0c0698f17c258526e33642b65b | |
parent | ad6fcad33033f0966874588590b70963b23f0b99 (diff) |
chore: cleanup warnings (#365)
Signed-off-by: kjuulh <contact@kjuulh.io>
-rw-r--r-- | src/commands/command_line.rs | 2 | ||||
-rw-r--r-- | src/context/app_context.rs | 2 | ||||
-rw-r--r-- | src/ui/views/tui_textfield.rs | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/command_line.rs b/src/commands/command_line.rs index 608e5dd..5a311b9 100644 --- a/src/commands/command_line.rs +++ b/src/commands/command_line.rs @@ -24,7 +24,7 @@ pub fn read_and_execute( if let Some(s) = user_input { let trimmed = s.trim_start(); - context.commandline_context_mut().history_mut().add(trimmed); + let _ = context.commandline_context_mut().history_mut().add(trimmed); let command = Command::from_str(trimmed)?; command.execute(context, backend, keymap_t) } else { diff --git a/src/context/app_context.rs b/src/context/app_context.rs index 4f605ce..7971562 100644 --- a/src/context/app_context.rs +++ b/src/context/app_context.rs @@ -56,7 +56,7 @@ impl AppContext { let event_tx = events.event_tx.clone(); let mut commandline_context = CommandLineContext::new(); - commandline_context.history_mut().set_max_len(20); + let _ = commandline_context.history_mut().set_max_len(20); let event_tx_for_fs_notification = event_tx.clone(); let watcher = notify::recommended_watcher(move |res| { diff --git a/src/ui/views/tui_textfield.rs b/src/ui/views/tui_textfield.rs index 2bdbd96..80297ee 100644 --- a/src/ui/views/tui_textfield.rs +++ b/src/ui/views/tui_textfield.rs @@ -23,15 +23,15 @@ use crate::ui::AppBackend; pub struct DummyListener {} impl DeleteListener for DummyListener { - fn delete(&mut self, idx: usize, string: &str, dir: Direction) {} + fn delete(&mut self, _idx: usize, _string: &str, _dir: Direction) {} } impl ChangeListener for DummyListener { - fn insert_char(&mut self, idx: usize, c: char) {} + fn insert_char(&mut self, _idx: usize, _c: char) {} - fn insert_str(&mut self, idx: usize, string: &str) {} + fn insert_str(&mut self, _idx: usize, _string: &str) {} - fn replace(&mut self, idx: usize, old: &str, new: &str) {} + fn replace(&mut self, _idx: usize, _old: &str, _new: &str) {} } struct CompletionTracker { |