Skip to content

Commit 73b4976

Browse files
committed
Merge pull request #16 from steveklabnik/master
fail -> panic
2 parents d6f3411 + 8889e43 commit 73b4976

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: tests/directory/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ use physfs::file;
44
#[test]
55
fn read_file_from_directory() {
66
let con = match PhysFSContext::new() {
7-
Err(msg) => fail!(msg),
7+
Err(msg) => panic!(msg),
88
Ok(con) => con
99
};
1010

1111
assert!(PhysFSContext::is_init());
1212

1313
match con.mount(super::path_to_here.to_string(), "/test/".to_string(), true) {
14-
Err(msg) => fail!(msg),
14+
Err(msg) => panic!(msg),
1515
_ => {}
1616
}
1717

1818
let file = match file::File::open(&con, "/test/directory/read.txt".to_string(), file::Read) {
1919
Ok(f) => f,
20-
Err(msg) => fail!(msg)
20+
Err(msg) => panic!(msg)
2121
};
2222

2323
let mut bytes = [0u8, ..32];
2424
let buf = bytes.as_mut_slice();
2525

2626
match file.read(buf, 1, 32) {
27-
Err(msg) => fail!(msg),
27+
Err(msg) => panic!(msg),
2828
_ => {}
2929
}
3030

0 commit comments

Comments
 (0)