From 114061c4423cb4d04f2c1ed7f8af9cba54cd4567 Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 22 Dec 2019 20:58:58 -0400 Subject: [PATCH] fix motd ownership --- src/patch/patch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patch/patch.rs b/src/patch/patch.rs index 2fae5b0..dcca2be 100644 --- a/src/patch/patch.rs +++ b/src/patch/patch.rs @@ -176,7 +176,7 @@ impl ServerState for PatchServerState { Box::new(vec![SendPatchPacket::RequestLogin(RequestLogin {})].into_iter().map(move |pkt| (id, pkt))) }, RecvPatchPacket::LoginReply(_pkt) => { - let mut p = vec![SendPatchPacket::Message(Message::new(self.patch_motd.to_string()))]; + let mut p = vec![SendPatchPacket::Message(Message::new(self.patch_motd.clone()))]; p.append(&mut get_file_list_packets(&self.patch_file_tree)); p.push(SendPatchPacket::PatchEndList(PatchEndList {})); Box::new(p.into_iter().map(move |pkt| (id, pkt)))