Commit 850da79 Chojan Shang
authored
1 parent dee9fc9 commit 850da79 Copy full SHA for 850da79
File tree 2 files changed +11
-13
lines changed
2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ aws-config = "0.6.0"
37
37
blocking = " 1.1.0"
38
38
anyhow = " 1"
39
39
reqwest = " 0.11"
40
- lazy_static = " 1"
40
+ once_cell = " 1"
41
41
42
42
[dev-dependencies ]
43
43
uuid = { version = " 0.8" , features = [" serde" , " v4" ] }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ use aws_smithy_http::byte_stream::ByteStream;
32
32
use aws_smithy_http:: result:: SdkError ;
33
33
use futures:: TryStreamExt ;
34
34
use http:: { HeaderValue , StatusCode } ;
35
- use lazy_static :: lazy_static ;
35
+ use once_cell :: sync :: Lazy ;
36
36
37
37
use crate :: credential:: Credential ;
38
38
use crate :: error:: Error ;
@@ -48,17 +48,15 @@ use crate::readers::ReaderStream;
48
48
use crate :: Accessor ;
49
49
use crate :: BoxedAsyncReader ;
50
50
51
- lazy_static ! {
52
- static ref ENDPOINT_TEMPLATES : HashMap <& ' static str , & ' static str > = {
53
- let mut m = HashMap :: new( ) ;
54
- // AWS S3 Service.
55
- m. insert(
56
- "https://s3.amazonaws.com" ,
57
- "https://s3.{region}.amazonaws.com" ,
58
- ) ;
59
- m
60
- } ;
61
- }
51
+ static ENDPOINT_TEMPLATES : Lazy < HashMap < & ' static str , & ' static str > > = Lazy :: new ( || {
52
+ let mut m = HashMap :: new ( ) ;
53
+ // AWS S3 Service.
54
+ m. insert (
55
+ "https://s3.amazonaws.com" ,
56
+ "https://s3.{region}.amazonaws.com" ,
57
+ ) ;
58
+ m
59
+ } ) ;
62
60
63
61
/// # TODO
64
62
///
You can’t perform that action at this time.
0 commit comments