@@ -20,11 +20,10 @@ use minio::s3::creds::StaticProvider;
20
20
use minio:: s3:: http:: BaseUrl ;
21
21
use minio:: s3:: types:: S3Api ;
22
22
use std:: path:: { Path , PathBuf } ;
23
- use std:: sync:: Arc ;
24
23
25
24
#[ derive( Clone ) ]
26
25
pub struct TestContext {
27
- pub client : Arc < Client > ,
26
+ pub client : Client ,
28
27
pub base_url : BaseUrl ,
29
28
pub access_key : String ,
30
29
pub secret_key : String ,
@@ -58,15 +57,13 @@ impl TestContext {
58
57
}
59
58
60
59
let static_provider = StaticProvider :: new ( & access_key, & secret_key, None ) ;
61
- let client = Arc :: new (
62
- Client :: new (
63
- base_url. clone ( ) ,
64
- Some ( Box :: new ( static_provider) ) ,
65
- ssl_cert_file,
66
- Some ( ignore_cert_check) ,
67
- )
68
- . unwrap ( ) ,
69
- ) ;
60
+ let client = Client :: new (
61
+ base_url. clone ( ) ,
62
+ Some ( Box :: new ( static_provider) ) ,
63
+ ssl_cert_file,
64
+ Some ( ignore_cert_check) ,
65
+ )
66
+ . unwrap ( ) ;
70
67
71
68
Self {
72
69
client,
@@ -117,15 +114,13 @@ impl TestContext {
117
114
base_url. region = region;
118
115
119
116
let static_provider = StaticProvider :: new ( & access_key, & secret_key, None ) ;
120
- let client = Arc :: new (
121
- Client :: new (
122
- base_url. clone ( ) ,
123
- Some ( Box :: new ( static_provider) ) ,
124
- Some ( & * ssl_cert_file) ,
125
- Some ( ignore_cert_check) ,
126
- )
127
- . unwrap ( ) ,
128
- ) ;
117
+ let client = Client :: new (
118
+ base_url. clone ( ) ,
119
+ Some ( Box :: new ( static_provider) ) ,
120
+ Some ( & * ssl_cert_file) ,
121
+ Some ( ignore_cert_check) ,
122
+ )
123
+ . unwrap ( ) ;
129
124
130
125
Self {
131
126
client,
0 commit comments