From 298c1d93b417166562fab3067239d3a1cddec1ac Mon Sep 17 00:00:00 2001 From: leonidchashnikov Date: Mon, 22 Apr 2024 20:23:43 +0100 Subject: [PATCH] Change Command implementation from trait to enum --- src/server/commands.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/server/commands.rs b/src/server/commands.rs index d81c076..ec4a5ab 100644 --- a/src/server/commands.rs +++ b/src/server/commands.rs @@ -5,7 +5,6 @@ pub enum CommandEnum { ExitCommand(Exit), } -// Define concrete command types pub struct Put { pub key: String, pub value: String, @@ -21,14 +20,6 @@ pub struct Exists { pub struct Exit {} -// impl Command for PutCommand {} -// -// impl Command for GetCommand {} -// -// impl Command for ExistsCommand {} -// -// impl Command for ExitCommand {} - pub trait CommandResponse { fn serialize(&self) -> String;