summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-04-11 20:45:11 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-04-11 20:45:11 +0200
commite6ed91d0efab436c8a1ca4b6f701b6a9a4d96ccd (patch)
treed246e448c6cbd86df795452c220f39723d09a714 /src/lib.rs
parent972319c1811e1a9c4f491a03ba92ea5a624cca5e (diff)
Refactoring, move where whitespace is handled
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 134ba97..5fbea79 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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(()));
}