summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-03-08 18:20:29 +0100
committerNadrieril2019-03-08 18:20:29 +0100
commit74719869dc8aae53bf9521de55188c08f4ebaf11 (patch)
tree7c7a2e37f521e58b7c3cbeab0b1e82f94e4e7ceb /dhall
parent78a0c10a4595683c034b8d3617f55c88cea2aa3c (diff)
rustfmt
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/lib.rs2
-rw-r--r--dhall/tests/macros.rs12
2 files changed, 9 insertions, 5 deletions
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index 6372768..d7758f1 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -8,10 +8,10 @@ pub mod imports;
pub mod typecheck;
use dhall_core::*;
+use std::fmt;
use std::fs::File;
use std::io::Read;
use std::path::Path;
-use std::fmt;
#[derive(Debug)]
pub enum DhallError {
diff --git a/dhall/tests/macros.rs b/dhall/tests/macros.rs
index b27b850..a126d5b 100644
--- a/dhall/tests/macros.rs
+++ b/dhall/tests/macros.rs
@@ -99,19 +99,23 @@ pub fn run_test(base_path: &str, feature: Feature, expected: ExpectedResult) {
}
(Feature::Parser, ExpectedResult::Failure) => {
let file_path: PathBuf = (base_path.to_owned() + ".dhall").into();
- let err = load_dhall_file(&file_path, &mut source_pool, true).unwrap_err();
+ let err = load_dhall_file(&file_path, &mut source_pool, true)
+ .unwrap_err();
match err {
- DhallError::ParseError(_) => {},
+ DhallError::ParseError(_) => {}
e => panic!("Expected parse error, got: {:?}", e),
}
}
(Feature::Normalization, ExpectedResult::Success) => {
let expr_file_path = base_path.to_owned() + "A.dhall";
let mut expr_buffer = String::new();
- let expr = read_dhall_file(&expr_file_path, &mut expr_buffer).unwrap();
+ let expr =
+ read_dhall_file(&expr_file_path, &mut expr_buffer).unwrap();
let expected_file_path = base_path.to_owned() + "B.dhall";
let mut expected_buffer = String::new();
- let expected = read_dhall_file(&expected_file_path, &mut expected_buffer).unwrap();
+ let expected =
+ read_dhall_file(&expected_file_path, &mut expected_buffer)
+ .unwrap();
assert_eq_!(
normalize::<_, _, X, _>(&expr),