diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-22 22:10:19 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-17 21:02:05 +0800 |
| commit | 5a5a07c7fad31641d032a743e4e87ffb58ade17d (patch) | |
| tree | b6fbd33e8de82e5f9d9e6b99e3cb2102e47fe3ee /rola-vcs/src/err | |
Initial commitmain
Diffstat (limited to 'rola-vcs/src/err')
| -rw-r--r-- | rola-vcs/src/err/io.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rola-vcs/src/err/io.rs b/rola-vcs/src/err/io.rs new file mode 100644 index 0000000..8dd4c1a --- /dev/null +++ b/rola-vcs/src/err/io.rs @@ -0,0 +1,10 @@ +use crate::{RolaError, RolaErrorData, RolaModule}; + +impl From<(RolaModule, std::io::Error)> for RolaError { + fn from(val: (RolaModule, std::io::Error)) -> Self { + let (module, io_err) = val; + let message = io_err.to_string(); + let data = RolaErrorData::IO(io_err); + RolaError::new(module, data, message) + } +} |
