mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
Use captured args in format string (#558)
This commit is contained in:
@ -44,7 +44,7 @@ async fn main() {
|
||||
match msg {
|
||||
Ok(ws::Frame::Text(txt)) => {
|
||||
// log echoed messages from server
|
||||
log::info!("Server: {:?}", txt)
|
||||
log::info!("Server: {txt:?}")
|
||||
}
|
||||
|
||||
Ok(ws::Frame::Ping(_)) => {
|
||||
|
@ -57,7 +57,7 @@ impl Actor for MyWebSocket {
|
||||
impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for MyWebSocket {
|
||||
fn handle(&mut self, msg: Result<ws::Message, ws::ProtocolError>, ctx: &mut Self::Context) {
|
||||
// process websocket messages
|
||||
println!("WS: {:?}", msg);
|
||||
println!("WS: {msg:?}");
|
||||
match msg {
|
||||
Ok(ws::Message::Ping(msg)) => {
|
||||
self.hb = Instant::now();
|
||||
|
Reference in New Issue
Block a user