rust/physfs-rs/src/physfs/util.rs
changeset 14440 a1613788130d
--- /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())[..])
+}