Skip to content

Commit

Permalink
Avoid io::Result type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Sep 4, 2024
1 parent 139550b commit 6d1267c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ pub trait ConfigBuilderExt {
/// This will return an error if no valid certs were found. In that case,
/// it's recommended to use `with_webpki_roots`.
#[cfg(feature = "rustls-native-certs")]
fn with_native_roots(self) -> std::io::Result<ConfigBuilder<ClientConfig, WantsClientCert>>;
fn with_native_roots(
self,
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, std::io::Error>;

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

#[cfg(feature = "rustls-native-certs")]
#[cfg_attr(not(feature = "logging"), allow(unused_variables))]
fn with_native_roots(self) -> std::io::Result<ConfigBuilder<ClientConfig, WantsClientCert>> {
fn with_native_roots(
self,
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, std::io::Error> {
let mut roots = rustls::RootCertStore::empty();
let mut valid_count = 0;
let mut invalid_count = 0;
Expand Down

0 comments on commit 6d1267c

Please sign in to comment.