feat(tvix/castore): convert import error to std::io::Error

So that we can just `map_err` easily in functions returning `std::io::Error` but calling functions
returning `castore::import::Error`.

Change-Id: Id181b95e8431c69e95f3a8cd569ca10306656e1d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10572
Autosubmit: raitobezarius <tvl@lahfa.xyz>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
This commit is contained in:
Ryan Lahfa 2024-01-08 09:45:55 +01:00 committed by clbot
parent 501827db59
commit 93afc711f6

View file

@ -44,6 +44,12 @@ impl From<CastoreError> for Error {
} }
} }
impl From<Error> for std::io::Error {
fn from(value: Error) -> Self {
std::io::Error::new(std::io::ErrorKind::Other, value)
}
}
/// This processes a given [walkdir::DirEntry] and returns a /// This processes a given [walkdir::DirEntry] and returns a
/// proto::node::Node, depending on the type of the entry. /// proto::node::Node, depending on the type of the entry.
/// ///