File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ jobs:
105105 - name : Install rust toolchain
106106 uses : dtolnay/rust-toolchain@master
107107 with :
108- toolchain : " 1.71 "
108+ toolchain : " 1.85 "
109109
110110 - name : Check MSRV
111111 run : cargo check --lib --locked --all-features
Original file line number Diff line number Diff line change 22name = " hyper-rustls"
33version = " 0.27.7"
44edition = " 2021"
5- rust-version = " 1.71 "
5+ rust-version = " 1.85 "
66license = " Apache-2.0 OR ISC OR MIT"
77readme = " README.md"
88description = " Rustls+hyper integration for pure rust HTTPS"
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn main() {
2323}
2424
2525fn error ( err : String ) -> io:: Error {
26- io:: Error :: new ( io :: ErrorKind :: Other , err)
26+ io:: Error :: other ( err)
2727}
2828
2929#[ tokio:: main]
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ fn main() {
3030}
3131
3232fn error ( err : String ) -> io:: Error {
33- io:: Error :: new ( io :: ErrorKind :: Other , err)
33+ io:: Error :: other ( err)
3434}
3535
3636#[ tokio:: main]
Original file line number Diff line number Diff line change @@ -94,16 +94,10 @@ where
9494 }
9595 Some ( scheme) if scheme != & http:: uri:: Scheme :: HTTPS => {
9696 let message = format ! ( "unsupported scheme {scheme}" ) ;
97- return Box :: pin ( async move {
98- Err ( io:: Error :: new ( io:: ErrorKind :: Other , message) . into ( ) )
99- } ) ;
97+ return Box :: pin ( async move { Err ( io:: Error :: other ( message) . into ( ) ) } ) ;
10098 }
10199 Some ( _) => { }
102- None => {
103- return Box :: pin ( async move {
104- Err ( io:: Error :: new ( io:: ErrorKind :: Other , "missing scheme" ) . into ( ) )
105- } )
106- }
100+ None => return Box :: pin ( async move { Err ( io:: Error :: other ( "missing scheme" ) . into ( ) ) } ) ,
107101 } ;
108102
109103 let cfg = self . tls_config . clone ( ) ;
@@ -123,7 +117,7 @@ where
123117 TlsConnector :: from ( cfg)
124118 . connect ( hostname, TokioIo :: new ( tcp) )
125119 . await
126- . map_err ( |e| io:: Error :: new ( io :: ErrorKind :: Other , e ) ) ?,
120+ . map_err ( io:: Error :: other ) ?,
127121 ) ) )
128122 } )
129123 }
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
108108 ClientConfig :: builder_with_provider ( provider. into ( ) )
109109 . with_safe_default_protocol_versions ( )
110110 . and_then ( |builder| builder. try_with_platform_verifier ( ) )
111- . map_err ( |e| std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , e ) ) ?
111+ . map_err ( std:: io:: Error :: other ) ?
112112 . with_no_client_auth ( ) ,
113113 ) )
114114 }
@@ -140,7 +140,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
140140 Ok ( self . with_tls_config (
141141 ClientConfig :: builder_with_provider ( provider. into ( ) )
142142 . with_safe_default_protocol_versions ( )
143- . map_err ( |e| std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , e ) ) ?
143+ . map_err ( std:: io:: Error :: other ) ?
144144 . with_native_roots ( ) ?
145145 . with_no_client_auth ( ) ,
146146 ) )
You can’t perform that action at this time.
0 commit comments