File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ rusoto_credential = "0.43"
51
51
52
52
# Async
53
53
futures = " 0.3"
54
- tokio = " 0.2"
54
+ tokio = { version = " 0.2" , features = [ " rt-threaded " ] }
55
55
56
56
[target .'cfg(not(windows))' .dependencies ]
57
57
libc = " 0.2"
Original file line number Diff line number Diff line change @@ -54,8 +54,6 @@ impl TestS3 {
54
54
55
55
impl Drop for TestS3 {
56
56
fn drop ( & mut self ) {
57
- let mut runtime = Runtime :: new ( ) . unwrap ( ) ;
58
-
59
57
// delete the bucket when the test ends
60
58
// this has to delete all the objects in the bucket first or min.io will give an error
61
59
let inner = self . 0 . borrow ( ) ;
@@ -64,7 +62,9 @@ impl Drop for TestS3 {
64
62
..Default :: default ( )
65
63
} ;
66
64
67
- let objects = runtime
65
+ let objects = inner
66
+ . runtime
67
+ . handle ( )
68
68
. block_on ( inner. client . list_objects ( list_req) )
69
69
. unwrap ( ) ;
70
70
assert ! ( !objects. is_truncated. unwrap_or( false ) ) ;
@@ -76,7 +76,9 @@ impl Drop for TestS3 {
76
76
..Default :: default ( )
77
77
} ;
78
78
79
- runtime
79
+ inner
80
+ . runtime
81
+ . handle ( )
80
82
. block_on ( inner. client . delete_object ( delete_req) )
81
83
. unwrap ( ) ;
82
84
}
@@ -85,7 +87,9 @@ impl Drop for TestS3 {
85
87
bucket : inner. bucket . to_owned ( ) ,
86
88
} ;
87
89
88
- runtime
90
+ inner
91
+ . runtime
92
+ . handle ( )
89
93
. block_on ( inner. client . delete_bucket ( delete_req) )
90
94
. expect ( "failed to delete test bucket" ) ;
91
95
}
Original file line number Diff line number Diff line change
1
+ Compiling tokio v0.2.21
2
+ Compiling cratesfyi v0.6.0 (G:\Users\Chase\Code\Rust\docs.rs)
3
+ Compiling tokio-util v0.3.1
4
+ Compiling tokio-tls v0.3.1
You can’t perform that action at this time.
0 commit comments