From 4045ae9cc1551fa6e685aeae41767b7e6c696978 Mon Sep 17 00:00:00 2001 From: Shachar Langbeheim Date: Wed, 12 Jul 2023 11:33:31 +0000 Subject: [PATCH] Exhaustive check the command enum --- babushka-core/src/socket_listener.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babushka-core/src/socket_listener.rs b/babushka-core/src/socket_listener.rs index 4e189c6323..1ae6952fd9 100644 --- a/babushka-core/src/socket_listener.rs +++ b/babushka-core/src/socket_listener.rs @@ -249,10 +249,10 @@ fn get_command(request: &Command) -> Option { .request_type .enum_value_or(RequestType::InvalidRequest); match request_enum { + RequestType::InvalidRequest => None, RequestType::CustomCommand => Some(Cmd::new()), RequestType::GetString => Some(cmd("GET")), RequestType::SetString => Some(cmd("SET")), - _ => None, } }