@@ -226,7 +226,7 @@ impl Prover<state::CommitAccepted> {
226226}
227227
228228impl Prover < state:: Connected > {
229- /// Returns `true` if the prover can read TLS data from the server.
229+ /// Returns `true` if the prover wants to read TLS data from the server.
230230 pub fn wants_read_tls ( & self ) -> bool {
231231 self . state . tls_client . wants_read_tls ( )
232232 }
@@ -242,10 +242,7 @@ impl Prover<state::Connected> {
242242 ///
243243 /// * `buf` - The buffer to read the TLS data from.
244244 pub fn read_tls ( & mut self , buf : & [ u8 ] ) -> Result < usize , ProverError > {
245- self . state
246- . tls_client
247- . read_tls ( buf)
248- . map_err ( ProverError :: from)
245+ self . state . tls_client . read_tls ( buf)
249246 }
250247
251248 /// Writes TLS data for the server into the provided buffer.
@@ -254,10 +251,7 @@ impl Prover<state::Connected> {
254251 ///
255252 /// * `buf` - The buffer to write the TLS data to.
256253 pub fn write_tls ( & mut self , buf : & mut [ u8 ] ) -> Result < usize , ProverError > {
257- self . state
258- . tls_client
259- . write_tls ( buf)
260- . map_err ( ProverError :: from)
254+ self . state . tls_client . write_tls ( buf)
261255 }
262256
263257 /// Returns `true` if the prover wants to read plaintext data.
@@ -276,7 +270,7 @@ impl Prover<state::Connected> {
276270 ///
277271 /// * `buf` - The buffer where the plaintext data gets written to.
278272 pub fn read ( & mut self , buf : & mut [ u8 ] ) -> Result < usize , ProverError > {
279- self . state . tls_client . read ( buf) . map_err ( ProverError :: from )
273+ self . state . tls_client . read ( buf)
280274 }
281275
282276 /// Writes plaintext data to be sent to the server.
@@ -285,23 +279,17 @@ impl Prover<state::Connected> {
285279 ///
286280 /// * `buf` - The buffer to read the plaintext data from.
287281 pub fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize , ProverError > {
288- self . state . tls_client . write ( buf) . map_err ( ProverError :: from )
282+ self . state . tls_client . write ( buf)
289283 }
290284
291285 /// Closes the connection from the client side.
292286 pub fn client_close ( & mut self ) -> Result < ( ) , ProverError > {
293- self . state
294- . tls_client
295- . client_close ( )
296- . map_err ( ProverError :: from)
287+ self . state . tls_client . client_close ( )
297288 }
298289
299290 /// Closes the connection from the server side.
300291 pub fn server_close ( & mut self ) -> Result < ( ) , ProverError > {
301- self . state
302- . tls_client
303- . server_close ( )
304- . map_err ( ProverError :: from)
292+ self . state . tls_client . server_close ( )
305293 }
306294
307295 /// Enables or disables the decryption of data from the server until the
@@ -311,10 +299,7 @@ impl Prover<state::Connected> {
311299 ///
312300 /// * `enable` - Whether to enable or disable decryption.
313301 pub fn enable_decryption ( & mut self , enable : bool ) -> Result < ( ) , ProverError > {
314- self . state
315- . tls_client
316- . enable_decryption ( enable)
317- . map_err ( ProverError :: from)
302+ self . state . tls_client . enable_decryption ( enable)
318303 }
319304
320305 /// Returns `true` if decryption of TLS traffic from the server is active.
@@ -330,9 +315,9 @@ impl Prover<state::Connected> {
330315 pub fn poll ( & mut self , cx : & mut Context ) -> Poll < Result < ( ) , ProverError > > {
331316 let _ = self . state . mux_fut . poll_unpin ( cx) ?;
332317
333- match self . state . tls_client . poll ( cx) {
318+ match self . state . tls_client . poll ( cx) ? {
334319 Poll :: Ready ( output) => {
335- self . state . output = Some ( output? ) ;
320+ self . state . output = Some ( output) ;
336321 Poll :: Ready ( Ok ( ( ) ) )
337322 }
338323 Poll :: Pending => Poll :: Pending ,
0 commit comments