Inline variables in format! strings

This commit is contained in:
2023-02-21 11:44:09 +01:00
parent 7357062f92
commit a757241b5d

View File

@@ -36,9 +36,7 @@ async fn run_player(
let write = handle.write.clone();
let ra = rx
.map(|c| {
serde_json::to_string(&c).unwrap_or_else(|_| panic!("Could not serialize {:?}", c))
})
.map(|c| serde_json::to_string(&c).unwrap_or_else(|_| panic!("Could not serialize {c:?}")))
.map(WebsocketMessage::Text)
.map(Ok)
.forward(incoming);
@@ -96,7 +94,7 @@ async fn handle_connection(
return Ok(());
}
msg => eprintln!("[{addr}] Received illegal message {:?}", msg),
msg => eprintln!("[{addr}] Received illegal message {msg:?}"),
}
}