legion_error/from_std/mod.rs
1use crate::{LegionError, LegionErrorKind};
2
3impl From<LegionErrorKind> for LegionError {
4 fn from(error: LegionErrorKind) -> Self {
5 Self { kind: error }
6 }
7}
8
9impl From<std::io::Error> for LegionError {
10 fn from(error: std::io::Error) -> Self {
11 Self { kind: LegionErrorKind::IoError { source: error, path: None } }
12 }
13}