author | alfadur <mail@none> |
Mon, 04 Feb 2019 20:25:35 +0300 | |
changeset 14678 | 08a8605bafaf |
parent 14440 | a1613788130d |
permissions | -rw-r--r-- |
14440
a1613788130d
Adopt physfs-rs lib and adapt it to recent std library, remove global mutex
unc0rr
parents:
diff
changeset
|
1 |
use std::io::{ Error, ErrorKind }; |
a1613788130d
Adopt physfs-rs lib and adapt it to recent std library, remove global mutex
unc0rr
parents:
diff
changeset
|
2 |
use super::PhysFSContext; |
a1613788130d
Adopt physfs-rs lib and adapt it to recent std library, remove global mutex
unc0rr
parents:
diff
changeset
|
3 |
|
a1613788130d
Adopt physfs-rs lib and adapt it to recent std library, remove global mutex
unc0rr
parents:
diff
changeset
|
4 |
pub fn physfs_error_as_io_error() -> Error { |
a1613788130d
Adopt physfs-rs lib and adapt it to recent std library, remove global mutex
unc0rr
parents:
diff
changeset
|
5 |
Error::new(ErrorKind::Other, |
a1613788130d
Adopt physfs-rs lib and adapt it to recent std library, remove global mutex
unc0rr
parents:
diff
changeset
|
6 |
&format!("PhysicsFS Error: `{}`", PhysFSContext::get_last_error())[..]) |
a1613788130d
Adopt physfs-rs lib and adapt it to recent std library, remove global mutex
unc0rr
parents:
diff
changeset
|
7 |
} |