Add todos

This commit is contained in:
bitfl0wer 2023-11-19 12:51:13 +01:00
parent 565a0cd745
commit 9f45094bd9
1 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ impl
// Wait for the first hello and then spawn both tasks so we avoid nested tasks // Wait for the first hello and then spawn both tasks so we avoid nested tasks
// This automatically spawns the heartbeat task, but from the main thread // This automatically spawns the heartbeat task, but from the main thread
// TODO: We likely should not unwrap here.
let msg = websocket_receive.next().await.unwrap().unwrap(); let msg = websocket_receive.next().await.unwrap().unwrap();
let gateway_payload: types::GatewayReceivePayload = let gateway_payload: types::GatewayReceivePayload =
serde_json::from_str(msg.to_text().unwrap()).unwrap(); serde_json::from_str(msg.to_text().unwrap()).unwrap();
@ -89,7 +90,7 @@ impl
serde_json::from_str(gateway_payload.event_data.unwrap().get()).unwrap(); serde_json::from_str(gateway_payload.event_data.unwrap().get()).unwrap();
let events = Events::default(); let events = Events::default();
let shared_events = Arc::new(Mutex::new(events)); let shared_events: Arc<Mutex<Events>> = Arc::new(Mutex::new(events));
let store = Arc::new(Mutex::new(HashMap::new())); let store = Arc::new(Mutex::new(HashMap::new()));