File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -901,7 +901,7 @@ fn load_certs(filename: &Path) -> std::io::Result<Vec<rustls::Certificate>> {
901901
902902 // Load and return certificate.
903903 rustls_pemfile:: certs ( & mut reader)
904- . map_err ( |_ | error ( "failed to load certificate" . into ( ) ) )
904+ . map_err ( |err | error ( format ! ( "failed to load certificate: {err}" ) ) )
905905 . map ( |mut chain| chain. drain ( ..) . map ( rustls:: Certificate ) . collect ( ) )
906906}
907907
@@ -915,7 +915,7 @@ fn load_private_key(filename: &Path) -> std::io::Result<rustls::PrivateKey> {
915915
916916 // Load and return a single private key.
917917 let keys = rustls_pemfile:: pkcs8_private_keys ( & mut reader)
918- . map_err ( |_ | error ( "failed to load private key" . into ( ) ) ) ?;
918+ . map_err ( |err | error ( format ! ( "failed to load private key: {err}" ) ) ) ?;
919919 if keys. len ( ) != 1 {
920920 return Err ( error ( "expected a single private key" . into ( ) ) ) ;
921921 }
You can’t perform that action at this time.
0 commit comments