From 85d1eeff70b7208f5f4fcbad204e80672785453e Mon Sep 17 00:00:00 2001 From: rasul Date: Wed, 8 Apr 2020 10:53:53 -0500 Subject: [PATCH] provide new state --- src/command/dispatch/quit.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/command/dispatch/quit.rs b/src/command/dispatch/quit.rs index fa946a2..9df0bef 100644 --- a/src/command/dispatch/quit.rs +++ b/src/command/dispatch/quit.rs @@ -3,10 +3,11 @@ use mio::Token; use crate::command::Command; use crate::database::Db; use crate::queue::SendQueue; +use crate::state::State; impl Command { /// Quit the game pub fn dispatch_quit(&self, _: String, token: Token, _: &mut Db) -> SendQueue { - (token, "Goodbye\n\n").into() + SendQueue(vec![(token, "Goodbye\n\n".into(), false, Some(State::Quit))].into()) } }