Skip to content

Commit c66d283

Browse files
committed
Bump MSRV to 1.85 (for rustls-platform-verifier -> jni)
1 parent 4b90026 commit c66d283

6 files changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "hyper-rustls"
33
version = "0.27.7"
44
edition = "2021"
5-
rust-version = "1.71"
5+
rust-version = "1.85"
66
license = "Apache-2.0 OR ISC OR MIT"
77
readme = "README.md"
88
description = "Rustls+hyper integration for pure rust HTTPS"

examples/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323
}
2424

2525
fn error(err: String) -> io::Error {
26-
io::Error::new(io::ErrorKind::Other, err)
26+
io::Error::other(err)
2727
}
2828

2929
#[tokio::main]

examples/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() {
3030
}
3131

3232
fn error(err: String) -> io::Error {
33-
io::Error::new(io::ErrorKind::Other, err)
33+
io::Error::other(err)
3434
}
3535

3636
#[tokio::main]

src/connector.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff 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
}

src/connector/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
))

0 commit comments

Comments
 (0)