From 2d3c15e571a1885eb7657d4fe5c4905460819164 Mon Sep 17 00:00:00 2001 From: mars Date: Wed, 12 Apr 2023 21:32:46 -0400 Subject: [PATCH] Rename queue_command() to execute_command() --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0be363b..f2f5240 100644 --- a/src/main.rs +++ b/src/main.rs @@ -252,7 +252,7 @@ impl State { } KeyCode::Enter => { // TODO add to command history - let result = self.queue_command(&state.buf); + let result = self.execute_command(&state.buf); let error = result.err(); self.mode = Mode::Normal(NormalState { error }); return; @@ -352,7 +352,7 @@ impl State { self.write_buffer(handle).map_err(|err| format!("{}", err)) } - fn queue_command(&mut self, command: &str) -> std::result::Result<(), String> { + fn execute_command(mut self, command: &str) -> std::result::Result<(), String> { let command_parts = command.split(' ').collect::>(); let command = match command_parts.get(0) {