summaryrefslogtreecommitdiff
path: root/dhall/src/phase/binary.rs
diff options
context:
space:
mode:
authorFintan Halpenny2019-09-03 14:42:30 +0100
committerFintan Halpenny2019-09-03 14:42:30 +0100
commit4edaf0814868e604eed5cfd594ea3f448ca90678 (patch)
tree6dc5d888d1fd7030a5951846cd5ee1fff185ace6 /dhall/src/phase/binary.rs
parenteae1eac7048cd87d2775cdc470a295b9d2ee7346 (diff)
Move Canonicalize into resolve.
Rename File to FilePath and have more consistent naming.
Diffstat (limited to '')
-rw-r--r--dhall/src/phase/binary.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/dhall/src/phase/binary.rs b/dhall/src/phase/binary.rs
index 16e7ce9..3c45e81 100644
--- a/dhall/src/phase/binary.rs
+++ b/dhall/src/phase/binary.rs
@@ -6,7 +6,7 @@ use std::vec;
use dhall_syntax::map::DupTreeMap;
use dhall_syntax::{
rc, Expr, ExprF, FilePrefix, Hash, Import, ImportLocation, ImportMode,
- Integer, InterpolatedText, Label, Natural, Scheme, URL, V, File
+ Integer, InterpolatedText, Label, Natural, Scheme, URL, V, FilePath
};
use crate::error::{DecodeError, EncodeError};
@@ -279,7 +279,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
"import/remote/query".to_owned(),
))?,
};
- let file_path: Vec<_> = rest
+ let file_path = rest
.map(|s| match s.as_string() {
Some(s) => Ok(s.clone()),
None => Err(DecodeError::WrongFormatError(
@@ -287,7 +287,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
)),
})
.collect::<Result<_, _>>()?;
- let path = File { file_path };
+ let path = FilePath { file_path };
ImportLocation::Remote(URL {
scheme,
authority,
@@ -306,7 +306,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
"import/local/prefix".to_owned(),
))?,
};
- let file_path: Vec<_> = rest
+ let file_path = rest
.map(|s| match s.as_string() {
Some(s) => Ok(s.clone()),
None => Err(DecodeError::WrongFormatError(
@@ -314,7 +314,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
)),
})
.collect::<Result<_, _>>()?;
- let path = File { file_path };
+ let path = FilePath { file_path };
ImportLocation::Local(prefix, path)
}
6 => {