File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,6 @@ use aws_config::BehaviorVersion;
4
4
#[ cfg( feature = "aws-auth" ) ]
5
5
use aws_credential_types:: provider:: ProvideCredentials ;
6
6
7
- #[ allow( unused_imports) ]
8
- #[ cfg( feature = "aws-auth" ) ]
9
- use aws_types:: sdk_config:: SharedCredentialsProvider ;
10
-
11
7
// Note from RUST-1529: commented Duration import since original implementation is commented out
12
8
// use std::time::Duration;
13
9
@@ -123,7 +119,12 @@ async fn authenticate_stream_inner(
123
119
let creds = aws_config:: load_defaults ( BehaviorVersion :: latest ( ) )
124
120
. await
125
121
. credentials_provider ( )
126
- . expect ( "no credential provider configured" )
122
+ . ok_or_else ( || {
123
+ Error :: authentication_error (
124
+ MECH_NAME ,
125
+ & format ! ( "no credential provider configured" ) ,
126
+ )
127
+ } ) ?
127
128
. provide_credentials ( )
128
129
. await
129
130
. map_err ( |e| {
You can’t perform that action at this time.
0 commit comments