File tree Expand file tree Collapse file tree
rust/pact_consumer/src/builders Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use pact_models::v4::sync_message::SynchronousMessage;
1616#[ cfg( feature = "plugins" ) ] use pact_plugin_driver:: catalogue_manager:: CatalogueEntryType ;
1717#[ cfg( feature = "plugins" ) ] use pact_plugin_driver:: plugin_manager:: load_plugin;
1818#[ cfg( feature = "plugins" ) ] use pact_plugin_driver:: plugin_models:: PluginDependency ;
19- use tracing:: trace;
19+ use tracing:: { trace, warn } ;
2020
2121use pact_matching:: metrics:: { MetricEvent , send_metrics} ;
2222
@@ -73,9 +73,10 @@ impl PactBuilder {
7373 pact_mock_server:: configure_core_catalogue ( ) ;
7474
7575 if rustls:: crypto:: CryptoProvider :: get_default ( ) . is_none ( ) {
76- rustls:: crypto:: ring:: default_provider ( )
77- . install_default ( )
78- . expect ( "Failed to install rustls crypto provider" ) ;
76+ if let Err ( _) = rustls:: crypto:: ring:: default_provider ( )
77+ . install_default ( ) {
78+ warn ! ( "failed to installed the default crypto provider" ) ;
79+ }
7980 }
8081
8182 let mut pact = RequestResponsePact :: default ( ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use pact_models::v4::sync_message::SynchronousMessage;
1414#[ cfg( feature = "plugins" ) ] use pact_plugin_driver:: catalogue_manager:: CatalogueEntryType ;
1515#[ cfg( feature = "plugins" ) ] use pact_plugin_driver:: plugin_manager:: { drop_plugin_access, load_plugin} ;
1616#[ cfg( feature = "plugins" ) ] use pact_plugin_driver:: plugin_models:: { PluginDependency , PluginDependencyType } ;
17- use tracing:: trace;
17+ use tracing:: { trace, warn } ;
1818
1919use pact_matching:: metrics:: { MetricEvent , send_metrics} ;
2020
@@ -69,11 +69,12 @@ impl PactBuilderAsync {
6969 pact_matching:: matchingrules:: configure_core_catalogue ( ) ;
7070 pact_mock_server:: configure_core_catalogue ( ) ;
7171
72- if rustls:: crypto:: CryptoProvider :: get_default ( ) . is_none ( ) {
73- rustls:: crypto:: ring:: default_provider ( )
74- . install_default ( )
75- . expect ( "Failed to install rustls crypto provider") ;
72+ if rustls:: crypto:: CryptoProvider :: get_default ( ) . is_none ( ) {
73+ if let Err ( _ ) = rustls:: crypto:: ring:: default_provider ( )
74+ . install_default ( ) {
75+ warn ! ( "failed to installed the default crypto provider") ;
7676 }
77+ }
7778
7879 let mut pact = RequestResponsePact :: default ( ) ;
7980 pact. consumer = Consumer {
You can’t perform that action at this time.
0 commit comments