File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ impl<State> TlsListener<State> {
69
69
TlsListenerBuilder :: new ( )
70
70
}
71
71
72
- async fn configure ( & mut self ) -> io:: Result < TlsAcceptor > {
72
+ async fn configure ( & mut self ) -> io:: Result < ( ) > {
73
73
self . config = match std:: mem:: take ( & mut self . config ) {
74
74
TlsListenerConfig :: Paths { cert, key } => {
75
75
let certs = load_certs ( & cert) ?;
@@ -89,8 +89,8 @@ impl<State> TlsListener<State> {
89
89
other => other,
90
90
} ;
91
91
92
- if let TlsListenerConfig :: Acceptor ( ref a ) = self . config {
93
- Ok ( a . clone ( ) )
92
+ if let TlsListenerConfig :: Acceptor ( _ ) = self . config {
93
+ Ok ( ( ) )
94
94
} else {
95
95
Err ( io:: Error :: new (
96
96
io:: ErrorKind :: Other ,
@@ -113,17 +113,12 @@ impl<State> TlsListener<State> {
113
113
}
114
114
}
115
115
116
- async fn connect ( & mut self ) -> io:: Result < & TcpListener > {
116
+ async fn connect ( & mut self ) -> io:: Result < ( ) > {
117
117
if let TcpConnection :: Addrs ( addrs) = & self . connection {
118
118
let tcp = TcpListener :: bind ( & addrs[ ..] ) . await ?;
119
119
self . connection = TcpConnection :: Connected ( tcp) ;
120
120
}
121
-
122
- if let TcpConnection :: Connected ( tcp) = & self . connection {
123
- Ok ( tcp)
124
- } else {
125
- unreachable ! ( )
126
- }
121
+ Ok ( ( ) )
127
122
}
128
123
}
129
124
You can’t perform that action at this time.
0 commit comments