get elseware working with a newer version of rust #34

Merged
jake merged 13 commits from latestrust into master 2021-06-17 14:48:43 -04:00
Showing only changes of commit 1b9594dbec - Show all commits

View File

@ -156,14 +156,14 @@ where
match output_loop_receiver.recv().await { match output_loop_receiver.recv().await {
Ok(msg) => { Ok(msg) => {
let payload = serde_json::to_string(&msg); let payload = serde_json::to_string(&msg);
if let Ok(payload2) = payload { if let Ok(payload) = payload {
let len_bytes = u32::to_le_bytes(payload2.len() as u32); let len_bytes = u32::to_le_bytes(payload.len() as u32);
if let Err(err) = socket.write_all(&len_bytes).await { if let Err(err) = socket.write_all(&len_bytes).await {
warn!("interserver send failed: {:?}", err); warn!("interserver send failed: {:?}", err);
break; break;
} }
if let Err(err) = socket.write_all(&payload2.as_bytes()).await { if let Err(err) = socket.write_all(&payload.as_bytes()).await {
warn!("intserserver send failed: {:?}", err); warn!("intserserver send failed: {:?}", err);
break; break;
} }