@@ -16,7 +16,7 @@ use mysql_common::{
16
16
packets:: {
17
17
AuthPlugin , AuthSwitchRequest , CommonOkPacket , ErrPacket , HandshakePacket ,
18
18
HandshakeResponse , OkPacket , OkPacketDeserializer , OldAuthSwitchRequest , OldEofPacket ,
19
- ResultSetTerminator , SslRequest ,
19
+ ResultSetTerminator ,
20
20
} ,
21
21
proto:: MySerialize ,
22
22
row:: Row ,
@@ -528,7 +528,7 @@ impl Conn {
528
528
529
529
Ok ( ( ) )
530
530
}
531
- # [ cfg ( any ( not ( target_os = "wasi" ) , feature = "wasmedge-tls" ) ) ]
531
+
532
532
async fn switch_to_ssl_if_needed ( & mut self ) -> Result < ( ) > {
533
533
if self
534
534
. inner
@@ -929,7 +929,6 @@ impl Conn {
929
929
conn. inner . stream = Some ( stream) ;
930
930
conn. setup_stream ( ) ?;
931
931
conn. handle_handshake ( ) . await ?;
932
- #[ cfg( any( not( target_os = "wasi" ) , feature = "wasmedge-tls" ) ) ]
933
932
conn. switch_to_ssl_if_needed ( ) . await ?;
934
933
conn. do_handshake_response ( ) . await ?;
935
934
conn. continue_auth ( ) . await ?;
@@ -1452,7 +1451,10 @@ mod test {
1452
1451
#[ test]
1453
1452
fn should_not_panic_if_dropped_without_tokio_runtime ( ) {
1454
1453
let fut = Conn :: new ( get_opts ( ) ) ;
1455
- let runtime = tokio:: runtime:: Runtime :: new ( ) . unwrap ( ) ;
1454
+ let runtime = tokio:: runtime:: Builder :: new_current_thread ( )
1455
+ . enable_all ( )
1456
+ . build ( )
1457
+ . unwrap ( ) ;
1456
1458
runtime. block_on ( async {
1457
1459
fut. await . unwrap ( ) ;
1458
1460
} ) ;
0 commit comments