Inline variables in format!
strings
This commit is contained in:
@@ -36,9 +36,7 @@ async fn run_player(
|
|||||||
|
|
||||||
let write = handle.write.clone();
|
let write = handle.write.clone();
|
||||||
let ra = rx
|
let ra = rx
|
||||||
.map(|c| {
|
.map(|c| serde_json::to_string(&c).unwrap_or_else(|_| panic!("Could not serialize {c:?}")))
|
||||||
serde_json::to_string(&c).unwrap_or_else(|_| panic!("Could not serialize {:?}", c))
|
|
||||||
})
|
|
||||||
.map(WebsocketMessage::Text)
|
.map(WebsocketMessage::Text)
|
||||||
.map(Ok)
|
.map(Ok)
|
||||||
.forward(incoming);
|
.forward(incoming);
|
||||||
@@ -96,7 +94,7 @@ async fn handle_connection(
|
|||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
msg => eprintln!("[{addr}] Received illegal message {:?}", msg),
|
msg => eprintln!("[{addr}] Received illegal message {msg:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user