@@ -23,7 +23,7 @@ fn fs_stat() {
23
23
let meta = file. metadata ( ) . unwrap ( ) ;
24
24
25
25
// Create a filesystem StorageBackend with the directory containing our temp file as root
26
- let fs = Filesystem :: new ( & root) ;
26
+ let fs = Filesystem :: new ( & root) . unwrap ( ) ;
27
27
28
28
// Since the filesystem backend is based on futures, we need a runtime to run it
29
29
let rt = tokio:: runtime:: Builder :: new_current_thread ( ) . build ( ) . unwrap ( ) ;
@@ -48,7 +48,7 @@ fn fs_list() {
48
48
let meta = file. metadata ( ) . unwrap ( ) ;
49
49
50
50
// Create a filesystem StorageBackend with our root dir
51
- let fs = Filesystem :: new ( root. path ( ) ) ;
51
+ let fs = Filesystem :: new ( root. path ( ) ) . unwrap ( ) ;
52
52
53
53
// Since the filesystem backend is based on futures, we need a runtime to run it
54
54
let rt = tokio:: runtime:: Builder :: new_current_thread ( ) . build ( ) . unwrap ( ) ;
@@ -74,7 +74,7 @@ fn fs_list_fmt() {
74
74
let relpath = path. strip_prefix ( root. path ( ) ) . unwrap ( ) ;
75
75
76
76
// Create a filesystem StorageBackend with our root dir
77
- let fs = Filesystem :: new ( root. path ( ) ) ;
77
+ let fs = Filesystem :: new ( root. path ( ) ) . unwrap ( ) ;
78
78
79
79
let rt = tokio:: runtime:: Builder :: new_current_thread ( ) . build ( ) . unwrap ( ) ;
80
80
let my_list = rt. block_on ( fs. list_fmt ( & DefaultUser { } , "/" ) ) . unwrap ( ) ;
@@ -96,7 +96,7 @@ fn fs_get() {
96
96
file. write_all ( data) . unwrap ( ) ;
97
97
98
98
let filename = path. file_name ( ) . unwrap ( ) ;
99
- let fs = Filesystem :: new ( & root) ;
99
+ let fs = Filesystem :: new ( & root) . unwrap ( ) ;
100
100
101
101
// Since the filesystem backend is based on futures, we need a runtime to run it
102
102
let rt = Runtime :: new ( ) . unwrap ( ) ;
@@ -117,7 +117,7 @@ fn fs_get() {
117
117
fn fs_put ( ) {
118
118
let root = std:: env:: temp_dir ( ) ;
119
119
let orig_content = b"hallo" ;
120
- let fs = Filesystem :: new ( & root) ;
120
+ let fs = Filesystem :: new ( & root) . unwrap ( ) ;
121
121
122
122
// Since the Filesystem StorageBackend is based on futures, we need a runtime to run them
123
123
// to completion
@@ -178,7 +178,7 @@ fn fileinfo_fmt() {
178
178
#[ test]
179
179
fn fs_mkd ( ) {
180
180
let root = tempfile:: TempDir :: new ( ) . unwrap ( ) . into_path ( ) ;
181
- let fs = Filesystem :: new ( & root) ;
181
+ let fs = Filesystem :: new ( & root) . unwrap ( ) ;
182
182
let new_dir_name = "bla" ;
183
183
184
184
// Since the Filesystem StorageBackend is based on futures, we need a runtime to run them
@@ -203,7 +203,7 @@ fn fs_rename_file() {
203
203
// to completion
204
204
let rt = Runtime :: new ( ) . unwrap ( ) ;
205
205
206
- let fs = Filesystem :: new ( & root) ;
206
+ let fs = Filesystem :: new ( & root) . unwrap ( ) ;
207
207
let r = rt. block_on ( fs. rename ( & DefaultUser { } , & old_filename, & new_filename) ) ;
208
208
assert ! ( r. is_ok( ) ) ;
209
209
@@ -225,7 +225,7 @@ fn fs_rename_dir() {
225
225
// to completion
226
226
let rt = Runtime :: new ( ) . unwrap ( ) ;
227
227
228
- let fs = Filesystem :: new ( & root) ;
228
+ let fs = Filesystem :: new ( & root) . unwrap ( ) ;
229
229
let r = rt. block_on ( fs. rename ( & DefaultUser { } , & old_dir, & new_dir) ) ;
230
230
assert ! ( r. is_ok( ) ) ;
231
231
@@ -247,7 +247,7 @@ fn fs_md5() {
247
247
let mut file = file. as_file ( ) ;
248
248
249
249
// Create a filesystem StorageBackend with the directory containing our temp file as root
250
- let fs = Filesystem :: new ( & root) ;
250
+ let fs = Filesystem :: new ( & root) . unwrap ( ) ;
251
251
file. write_all ( DATA . as_bytes ( ) ) . unwrap ( ) ;
252
252
253
253
// Since the filesystem backend is based on futures, we need a runtime to run it
0 commit comments