diff options
author | tom barrett <spalf0@gmail.com> | 2019-02-19 13:24:25 -0600 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-02-19 13:24:25 -0600 |
commit | a4efade392aa7127c373b0247d39274cb0decd10 (patch) | |
tree | 72ff44e69917873ca9933c4a56794a15b99fb90c /src/client/construction.rs | |
parent | 892088d723fd3dc0aae969273331c2765f322e6f (diff) |
unified all server->client connection and brought logic to modules
Diffstat (limited to 'src/client/construction.rs')
-rw-r--r-- | src/client/construction.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/construction.rs b/src/client/construction.rs index 8cb812f..8549c09 100644 --- a/src/client/construction.rs +++ b/src/client/construction.rs @@ -8,8 +8,7 @@ use std::io::{BufRead, BufReader}; use std::net::TcpStream; use crate::constants; -use crate::modules::construction::ConstructionStatus; -use crate::server::construction::ConstructionData; +use crate::modules::construction::{ConstructionClientData, ConstructionStatus}; pub fn client_construction(mut stream: TcpStream, mut buff_r: BufReader<TcpStream>) { let stdout = stdout(); @@ -19,7 +18,7 @@ pub fn client_construction(mut stream: TcpStream, mut buff_r: BufReader<TcpStrea loop { let mut recv = String::new(); buff_r.read_line(&mut recv).unwrap(); - let data: ConstructionData = serde_json::from_str(&recv.replace("\n", "")).unwrap(); + let data: ConstructionClientData = serde_json::from_str(&recv.replace("\n", "")).unwrap(); write!(stdout, "{}", termion::clear::All).unwrap(); |