summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/binary/decode.rs
diff options
context:
space:
mode:
authorNadrieril Feneanar2020-03-05 16:20:07 +0000
committerGitHub2020-03-05 16:20:07 +0000
commit3f9194f47185fe30c9e410aa7c5e651df9694b3f (patch)
tree6d24b2e824822134da4976b65b413dc09ca4e567 /dhall/src/syntax/binary/decode.rs
parent2ca97e97f1718141d826a78ab3da8197b2d55c69 (diff)
parent8e6b020ba1426c215382a81395b809b688fa7726 (diff)
Merge pull request #139 from Nadrieril/missing-features
Implement a bunch of missing features
Diffstat (limited to 'dhall/src/syntax/binary/decode.rs')
-rw-r--r--dhall/src/syntax/binary/decode.rs10
1 files changed, 5 insertions, 5 deletions
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<DecodedExpr, DecodeError> {
})
.collect::<Result<_, _>>()?;
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<DecodedExpr, DecodeError> {
})
.collect::<Result<_, _>>()?;
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<DecodedExpr, DecodeError> {
"import/env".to_owned(),
))?,
};
- ImportLocation::Env(env)
+ ImportTarget::Env(env)
}
- 7 => ImportLocation::Missing,
+ 7 => ImportTarget::Missing,
_ => Err(DecodeError::WrongFormatError(
"import/type".to_owned(),
))?,