@@ -502,7 +502,7 @@ mod tests {
502502 Action :: SendPacket ( _response) => {
503503 assert_eq ! ( _response. ty( ) , PacketType :: Response ) ;
504504
505- let response = cast_packet :: < Response > ( & _response) ;
505+ let response = cast_packet :: < Response > ( & * * _response) ;
506506 let _: serde_json:: Value = serde_json:: from_str ( & response. json_response ) . unwrap ( ) ;
507507 }
508508 _ => panic ! ( ) ,
@@ -520,7 +520,7 @@ mod tests {
520520 match _pong {
521521 Action :: SendPacket ( _pong) => {
522522 assert_eq ! ( _pong. ty( ) , PacketType :: Pong ) ;
523- let pong = cast_packet :: < Pong > ( & _pong) ;
523+ let pong = cast_packet :: < Pong > ( & * _pong) ;
524524 assert_eq ! ( pong. payload, payload) ;
525525 }
526526 _ => panic ! ( ) ,
@@ -562,7 +562,7 @@ mod tests {
562562 Action :: SendPacket ( _set_compression) => {
563563 assert_eq ! ( _set_compression. ty( ) , PacketType :: SetCompression ) ;
564564
565- let set_compression = cast_packet :: < SetCompression > ( & _set_compression) ;
565+ let set_compression = cast_packet :: < SetCompression > ( & * _set_compression) ;
566566 assert_eq ! ( set_compression. threshold, config. io. compression_threshold) ;
567567 }
568568 _ => panic ! ( ) ,
@@ -582,7 +582,7 @@ mod tests {
582582 Action :: SendPacket ( _login_success) => {
583583 assert_eq ! ( _login_success. ty( ) , PacketType :: LoginSuccess ) ;
584584
585- let login_success = cast_packet :: < LoginSuccess > ( & _login_success) ;
585+ let login_success = cast_packet :: < LoginSuccess > ( & * _login_success) ;
586586 assert_eq ! ( login_success. username, username. to_string( ) ) ;
587587 }
588588 _ => panic ! ( ) ,
0 commit comments