diff --git a/test/test-rpc/src/transport.rs b/test/test-rpc/src/transport.rs index 753420900dcc..291e08eb532e 100644 --- a/test/test-rpc/src/transport.rs +++ b/test/test-rpc/src/transport.rs @@ -120,16 +120,18 @@ impl ConnectionHandle { } } -pub fn create_server_transports( - serial_stream: impl AsyncRead + AsyncWrite + Unpin + Send + 'static, -) -> ( +type ServerTransports = ( tarpc::transport::channel::UnboundedChannel< ClientMessage, Response, >, GrpcForwarder, CompletionHandle, -) { +); + +pub fn create_server_transports( + serial_stream: impl AsyncRead + AsyncWrite + Unpin + Send + 'static, +) -> ServerTransports { let (runner_forwarder_1, runner_forwarder_2) = tarpc::transport::channel::unbounded(); let (daemon_rx, mullvad_daemon_forwarder) = tokio::io::duplex(DAEMON_CHANNEL_BUF_SIZE); @@ -164,18 +166,7 @@ pub fn create_server_transports( pub fn create_client_transports( serial_stream: impl AsyncRead + AsyncWrite + Unpin + Send + 'static, -) -> Result< - ( - tarpc::transport::channel::UnboundedChannel< - Response, - ClientMessage, - >, - GrpcForwarder, - ConnectionHandle, - CompletionHandle, - ), - Error, -> { +) -> Result { let (runner_forwarder_1, runner_forwarder_2) = tarpc::transport::channel::unbounded(); let (daemon_rx, mullvad_daemon_forwarder) = tokio::io::duplex(DAEMON_CHANNEL_BUF_SIZE); @@ -216,6 +207,16 @@ pub fn create_client_transports( )) } +type ClientTransports = ( + tarpc::transport::channel::UnboundedChannel< + Response, + ClientMessage, + >, + GrpcForwarder, + ConnectionHandle, + CompletionHandle, +); + #[derive(err_derive::Error, Debug)] #[error(no_from)] enum ForwardError {