summaryrefslogtreecommitdiff
path: root/dhall_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'dhall_syntax')
-rw-r--r--dhall_syntax/src/parser.rs12
-rw-r--r--dhall_syntax/src/printer.rs7
2 files changed, 10 insertions, 9 deletions
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs
index f2dea53..83f62ee 100644
--- a/dhall_syntax/src/parser.rs
+++ b/dhall_syntax/src/parser.rs
@@ -335,7 +335,9 @@ impl DhallParser {
"Type" => Const(crate::Const::Type),
"Kind" => Const(crate::Const::Kind),
"Sort" => Const(crate::Const::Sort),
- _ => Err(input.error(format!("Unrecognized builtin: '{}'", s)))?,
+ _ => {
+ Err(input.error(format!("Unrecognized builtin: '{}'", s)))?
+ }
},
};
Ok(spanned(input, e))
@@ -447,9 +449,7 @@ impl DhallParser {
}
#[alias(local_path)]
- fn parent_path(
- input: ParseInput,
- ) -> ParseResult<(FilePrefix, FilePath)> {
+ fn parent_path(input: ParseInput) -> ParseResult<(FilePrefix, FilePath)> {
Ok(match_nodes!(input.into_children();
[path(p)] => (FilePrefix::Parent, p)
))
@@ -467,9 +467,7 @@ impl DhallParser {
))
}
#[alias(local_path)]
- fn absolute_path(
- input: ParseInput,
- ) -> ParseResult<(FilePrefix, FilePath)> {
+ fn absolute_path(input: ParseInput) -> ParseResult<(FilePrefix, FilePath)> {
Ok(match_nodes!(input.into_children();
[path(p)] => (FilePrefix::Absolute, p)
))
diff --git a/dhall_syntax/src/printer.rs b/dhall_syntax/src/printer.rs
index 1e3b7f2..19ec781 100644
--- a/dhall_syntax/src/printer.rs
+++ b/dhall_syntax/src/printer.rs
@@ -377,8 +377,11 @@ impl<SubExpr: Display> Display for Import<SubExpr> {
Absolute => "",
};
write!(f, "{}/", prefix)?;
- let path: String =
- path.file_path.iter().map(|c| quote_if_needed(&*c)).join("/");
+ let path: String = path
+ .file_path
+ .iter()
+ .map(|c| quote_if_needed(&*c))
+ .join("/");
f.write_str(&path)?;
}
Remote(url) => {