diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -7,12 +7,11 @@ use rustyline::error::ReadlineError; use std::{io, ops::ControlFlow}; use thiserror::Error; -pub fn run_command(user_input: String) -> Result<ControlFlow<(), ()>, ShackleError> { +pub fn run_command(user_input: &str) -> Result<ControlFlow<(), ()>, ShackleError> { match user_input.parse::<ShackleCommand>() { Err(parse_error) => { println!("{}", parse_error); } - Ok(ShackleCommand::Whitespace) => {} Ok(ShackleCommand::Exit) => { return Ok(ControlFlow::Break(())); } |