From 65f5fbd1f64c1cca2dc64d71ccf83fc79358de73 Mon Sep 17 00:00:00 2001 From: TcMits Date: Wed, 10 Sep 2025 16:31:12 +0700 Subject: [PATCH] no errors in consume --- cli/app.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cli/app.rs b/cli/app.rs index 298891f38..2f0df3d61 100644 --- a/cli/app.rs +++ b/cli/app.rs @@ -546,20 +546,19 @@ impl Limbo { } } - fn reset_line(&mut self) -> rustyline::Result<()> { + fn reset_line(&mut self) { // Entry is auto added to history // self.rl.add_history_entry(line.to_owned())?; self.interrupt_count.store(0, Ordering::Release); - Ok(()) } // consume will consume `input_buff` - pub fn consume(&mut self, flush: bool) -> anyhow::Result<()> { + pub fn consume(&mut self, flush: bool) { if self.input_buff.trim().is_empty() { - return Ok(()); + return; } - self.reset_line()?; + self.reset_line(); // we are taking ownership of input_buff here // its always safe because we split the string in two parts @@ -615,8 +614,6 @@ impl Limbo { self.set_multiline_prompt(); } } - - Ok(()) } pub fn handle_dot_command(&mut self, line: &str) {