From bfc458a5ce75762624115feaa50cfd3a3edd7bc0 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 8 Jan 2022 17:20:47 -0500 Subject: remove unnecessary code --- src/shell/mod.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 2e28ddb..7a16651 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -320,7 +320,8 @@ impl Shell { self.readline.clear_input(); let entry = self.history.entry(idx).await; let input = entry.cmd(); - let idx = match self.parse(input) { + let idx = match crate::parse::ast::Commands::parse(input) + { Ok(ast) => { let idx = self .history @@ -438,7 +439,8 @@ impl Shell { textmode::Key::Ctrl(b'm') => { let input = self.readline.input(); if !input.is_empty() { - let idx = match self.parse(input) { + let idx = match crate::parse::ast::Commands::parse(input) + { Ok(ast) => { let idx = self .history @@ -578,13 +580,4 @@ impl Shell { } self.focus_idx().map_or(Focus::Readline, Focus::History) } - - fn parse( - &self, - cmd: &str, - ) -> Result { - let ast = crate::parse::ast::Commands::parse(cmd)?; - // todo: interpolate - Ok(ast) - } } -- cgit v1.2.3-54-g00ecf