@@ -16,7 +16,7 @@ pub fn UseWebSocket() -> Html {
1616 Callback :: from ( move |_| {
1717 let message = "Hello, world!" . to_string ( ) ;
1818 ws. send ( message. clone ( ) ) ;
19- history. push ( format ! ( "ws1 [send]: {}" , message ) ) ;
19+ history. push ( format ! ( "ws1 [send]: {message}" ) ) ;
2020 } )
2121 } ;
2222 {
@@ -38,7 +38,7 @@ pub fn UseWebSocket() -> Html {
3838 Callback :: from ( move |_| {
3939 let message = b"Hello, world!\r \n " . to_vec ( ) ;
4040 ws. send_bytes ( message. clone ( ) ) ;
41- history. push ( format ! ( "ws1 [send]: bytes {:?}" , message ) ) ;
41+ history. push ( format ! ( "ws1 [send]: bytes {message :?}" ) ) ;
4242 } )
4343 } ;
4444 {
@@ -61,7 +61,7 @@ pub fn UseWebSocket() -> Html {
6161 UseWebSocketOptions {
6262 // Receive message by callback `onmessage`.
6363 onmessage : Some ( Box :: new ( move |message| {
64- history. push ( format ! ( "ws2 [recv]: {}" , message ) ) ;
64+ history. push ( format ! ( "ws2 [recv]: {message}" ) ) ;
6565 } ) ) ,
6666 manual : Some ( true ) ,
6767 ..Default :: default ( )
@@ -74,7 +74,7 @@ pub fn UseWebSocket() -> Html {
7474 Callback :: from ( move |_| {
7575 let message = "Hello, yew_hooks!" . to_string ( ) ;
7676 ws2. send ( message. clone ( ) ) ;
77- history. push ( format ! ( "ws2 [send]: {}" , message ) ) ;
77+ history. push ( format ! ( "ws2 [send]: {message}" ) ) ;
7878 } )
7979 } ;
8080 let onopen = {
0 commit comments