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/syntax/binary/decode.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dhall/src/syntax/binary/decode.rs') diff --git a/dhall/src/syntax/binary/decode.rs b/dhall/src/syntax/binary/decode.rs index 2e50d61..bebc800 100644 --- a/dhall/src/syntax/binary/decode.rs +++ b/dhall/src/syntax/binary/decode.rs @@ -5,7 +5,7 @@ use std::iter::FromIterator; use crate::error::DecodeError; use crate::syntax; use crate::syntax::{ - Expr, ExprKind, FilePath, FilePrefix, Hash, ImportLocation, ImportMode, + Expr, ExprKind, FilePath, FilePrefix, Hash, ImportMode, ImportTarget, Integer, InterpolatedText, Label, LitKind, Natural, Scheme, Span, UnspannedExpr, URL, V, }; @@ -305,7 +305,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result { }) .collect::>()?; let path = FilePath { file_path }; - ImportLocation::Remote(URL { + ImportTarget::Remote(URL { scheme, authority, path, @@ -332,7 +332,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result { }) .collect::>()?; let path = FilePath { file_path }; - ImportLocation::Local(prefix, path) + ImportTarget::Local(prefix, path) } 6 => { let env = match rest.next() { @@ -341,9 +341,9 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result { "import/env".to_owned(), ))?, }; - ImportLocation::Env(env) + ImportTarget::Env(env) } - 7 => ImportLocation::Missing, + 7 => ImportTarget::Missing, _ => Err(DecodeError::WrongFormatError( "import/type".to_owned(), ))?, -- cgit v1.2.3