From de865e9b7bef94787714d2dbd431a8fadc454382 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Sat, 18 Dec 2021 23:32:17 -0800 Subject: [PATCH] fixed moved reference to json -> update --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d1ecfb8..0d8576d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,8 @@ use std::{sync::mpsc, time::Duration}; use modules::{socket_handler::Socket, stream_states::stream_states_class::StreamState, message_handler::{MessageHandler, StateMessage}}; use workctl::sync_flag; +use crate::modules::stream_states::state_update::StateUpdate; + mod tests; mod modules; @@ -27,7 +29,8 @@ fn main() { match from_socket_rx.recv_timeout(Duration::from_millis(100)) { Ok(message) => { println!("{}", message); - let update = ::create_update_from_string(message); + let json = serde_json::from_str(&message[1..]).unwrap(); + let update = StateUpdate::json_to_state_update(json); }, Err(_) => {continue}, }