From 903d6c0bba36a6696eb337ae84b962f4cc48b5b5 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 4 Mar 2020 21:26:01 +0000 Subject: Implement remote imports and cleanup import chaining --- dhall/src/error/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dhall/src/error') diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs index 5632ea6..29dd5ad 100644 --- a/dhall/src/error/mod.rs +++ b/dhall/src/error/mod.rs @@ -30,6 +30,7 @@ pub(crate) enum ImportError { MissingEnvVar, UnexpectedImport(Import<()>), ImportCycle(ImportStack, Import<()>), + Url(url::ParseError), } #[derive(Debug)] @@ -111,6 +112,11 @@ impl From for Error { ErrorKind::Parse(err).into() } } +impl From for Error { + fn from(err: url::ParseError) -> Error { + ErrorKind::Resolve(ImportError::Url(err)).into() + } +} impl From for Error { fn from(err: DecodeError) -> Error { ErrorKind::Decode(err).into() -- cgit v1.2.3