diff -r 632dfc73cf83 -r a1613788130d rust/physfs-rs/src/physfs/util.rs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rust/physfs-rs/src/physfs/util.rs Thu Dec 13 23:44:46 2018 +0100 @@ -0,0 +1,7 @@ +use std::io::{ Error, ErrorKind }; +use super::PhysFSContext; + +pub fn physfs_error_as_io_error() -> Error { + Error::new(ErrorKind::Other, + &format!("PhysicsFS Error: `{}`", PhysFSContext::get_last_error())[..]) +}