rust/physfs-rs/src/physfs/util.rs
author martinraul
Wed, 28 Jun 2023 07:28:52 +0200
changeset 15963 cf5c7fa71134
parent 14435 a1613788130d
permissions -rw-r--r--
Updated Spanish translation Adapted from Pull Request #68 on the GitHub mirror: https://github.com/hedgewars/hw/pull/68

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())[..])
}