Rename queue_command() to execute_command()

This commit is contained in:
mars 2023-04-12 21:32:46 -04:00
parent 547dea6ac0
commit 2d3c15e571
1 changed files with 2 additions and 2 deletions

View File

@ -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::<Vec<&str>>();
let command = match command_parts.get(0) {