aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src
diff options
context:
space:
mode:
authorEskil Queseth <eskilq@kth.se>2020-10-21 20:31:42 +0200
committerEskil Queseth <eskilq@kth.se>2020-10-21 20:31:42 +0200
commitfbf61252b5977fe5ef017f68e75d6c9edae9596a (patch)
tree88c95c294936ec14a80a42e3c769ef6fd1db0c28 /mumd/src
parent64eca3bf729ccc20b82ca37d3ea72e6be872ec0c (diff)
downloadmum-fbf61252b5977fe5ef017f68e75d6c9edae9596a.tar.gz
remove async from State::handle_command
Diffstat (limited to 'mumd/src')
-rw-r--r--mumd/src/command.rs2
-rw-r--r--mumd/src/state.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/mumd/src/command.rs b/mumd/src/command.rs
index 075bfaf..5407ea3 100644
--- a/mumd/src/command.rs
+++ b/mumd/src/command.rs
@@ -19,7 +19,7 @@ pub async fn handle(
while let Some((command, response_sender)) = command_receiver.recv().await {
debug!("Received command {:?}", command);
let mut state = state.lock().unwrap();
- let (event, generator) = state.handle_command(command).await;
+ let (event, generator) = state.handle_command(command);
drop(state);
if let Some(event) = event {
let (tx, rx) = oneshot::channel();
diff --git a/mumd/src/state.rs b/mumd/src/state.rs
index f9ed077..7a33716 100644
--- a/mumd/src/state.rs
+++ b/mumd/src/state.rs
@@ -54,7 +54,7 @@ impl State {
}
//TODO? move bool inside Result
- pub async fn handle_command(
+ pub fn handle_command(
&mut self,
command: Command,
) -> (Option<TcpEvent>, Box<dyn FnOnce(Option<&TcpEventData>) -> mumlib::error::Result<Option<CommandResponse>>>) {