@@ -58,14 +58,14 @@ impl SidecarTransport {
5858 pub fn set_read_timeout ( & mut self , timeout : Option < Duration > ) -> io:: Result < ( ) > {
5959 match self . inner . lock ( ) {
6060 Ok ( mut t) => t. set_read_timeout ( timeout) ,
61- Err ( e) => Err ( io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ,
61+ Err ( e) => Err ( io:: Error :: other ( e. to_string ( ) ) ) ,
6262 }
6363 }
6464
6565 pub fn set_write_timeout ( & mut self , timeout : Option < Duration > ) -> io:: Result < ( ) > {
6666 match self . inner . lock ( ) {
6767 Ok ( mut t) => t. set_write_timeout ( timeout) ,
68- Err ( e) => Err ( io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ,
68+ Err ( e) => Err ( io:: Error :: other ( e. to_string ( ) ) ) ,
6969 }
7070 }
7171
@@ -81,14 +81,14 @@ impl SidecarTransport {
8181 pub fn send ( & mut self , item : SidecarInterfaceRequest ) -> io:: Result < ( ) > {
8282 match self . inner . lock ( ) {
8383 Ok ( mut t) => t. send ( item) ,
84- Err ( e) => Err ( io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ,
84+ Err ( e) => Err ( io:: Error :: other ( e. to_string ( ) ) ) ,
8585 }
8686 }
8787
8888 pub fn call ( & mut self , item : SidecarInterfaceRequest ) -> io:: Result < SidecarInterfaceResponse > {
8989 match self . inner . lock ( ) {
9090 Ok ( mut t) => t. call ( item) ,
91- Err ( e) => Err ( io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ,
91+ Err ( e) => Err ( io:: Error :: other ( e. to_string ( ) ) ) ,
9292 }
9393 }
9494}
0 commit comments