From 74719869dc8aae53bf9521de55188c08f4ebaf11 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 8 Mar 2019 18:20:29 +0100 Subject: rustfmt --- dhall/src/lib.rs | 2 +- dhall/tests/macros.rs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'dhall') 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), -- cgit v1.2.3