Skip to content

Commit fc884cd

Browse files
committed
Avoid io::Result type alias
1 parent 9bf087c commit fc884cd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: src/config.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ pub trait ConfigBuilderExt {
3030
/// This will return an error if no valid certs were found. In that case,
3131
/// it's recommended to use `with_webpki_roots`.
3232
#[cfg(feature = "rustls-native-certs")]
33-
fn with_native_roots(self) -> std::io::Result<ConfigBuilder<ClientConfig, WantsClientCert>>;
33+
fn with_native_roots(
34+
self,
35+
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, std::io::Error>;
3436

3537
/// This configures the webpki roots, which are Mozilla's set of
3638
/// trusted roots as packaged by webpki-roots.
@@ -49,7 +51,9 @@ impl ConfigBuilderExt for ConfigBuilder<ClientConfig, WantsVerifier> {
4951

5052
#[cfg(feature = "rustls-native-certs")]
5153
#[cfg_attr(not(feature = "logging"), allow(unused_variables))]
52-
fn with_native_roots(self) -> std::io::Result<ConfigBuilder<ClientConfig, WantsClientCert>> {
54+
fn with_native_roots(
55+
self,
56+
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, std::io::Error> {
5357
let mut roots = rustls::RootCertStore::empty();
5458
let mut valid_count = 0;
5559
let mut invalid_count = 0;

0 commit comments

Comments
 (0)