File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,27 +4,27 @@ use physfs::file;
4
4
#[ test]
5
5
fn read_file_from_directory ( ) {
6
6
let con = match PhysFSContext :: new ( ) {
7
- Err ( msg) => fail ! ( msg) ,
7
+ Err ( msg) => panic ! ( msg) ,
8
8
Ok ( con) => con
9
9
} ;
10
10
11
11
assert ! ( PhysFSContext :: is_init( ) ) ;
12
12
13
13
match con. mount ( super :: path_to_here. to_string ( ) , "/test/" . to_string ( ) , true ) {
14
- Err ( msg) => fail ! ( msg) ,
14
+ Err ( msg) => panic ! ( msg) ,
15
15
_ => { }
16
16
}
17
17
18
18
let file = match file:: File :: open ( & con, "/test/directory/read.txt" . to_string ( ) , file:: Read ) {
19
19
Ok ( f) => f,
20
- Err ( msg) => fail ! ( msg)
20
+ Err ( msg) => panic ! ( msg)
21
21
} ;
22
22
23
23
let mut bytes = [ 0u8 , ..32 ] ;
24
24
let buf = bytes. as_mut_slice ( ) ;
25
25
26
26
match file. read ( buf, 1 , 32 ) {
27
- Err ( msg) => fail ! ( msg) ,
27
+ Err ( msg) => panic ! ( msg) ,
28
28
_ => { }
29
29
}
30
30
You can’t perform that action at this time.
0 commit comments