From 35db1b4b54dba8b0cafe661329e0099dfabd8073 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 13 Mar 2020 17:04:47 +0000 Subject: Remove top-level Expr aliases --- dhall/src/tests.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'dhall/src/tests.rs') diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs index 659f6f7..2cd354f 100644 --- a/dhall/src/tests.rs +++ b/dhall/src/tests.rs @@ -10,8 +10,8 @@ use std::io::{Read, Write}; use std::path::PathBuf; use crate::error::{ErrorKind, Result}; -use crate::syntax::binary; -use crate::{Normalized, NormalizedExpr, Parsed, Resolved, Typed}; +use crate::syntax::{binary, Expr}; +use crate::{Normalized, Parsed, Resolved, Typed}; macro_rules! assert_eq_display { ($left:expr, $right:expr) => {{ @@ -111,7 +111,7 @@ impl TestFile { env::var("UPDATE_TEST_FILES") == Ok("1".to_string()) } /// Write the provided expression to the pointed file. - fn write_expr(&self, expr: impl Into) -> Result<()> { + fn write_expr(&self, expr: impl Into) -> Result<()> { let expr = expr.into(); let path = self.path(); create_dir_all(path.parent().unwrap())?; @@ -142,7 +142,7 @@ impl TestFile { } /// Check that the provided expression matches the file contents. - pub fn compare(&self, expr: impl Into) -> Result<()> { + pub fn compare(&self, expr: impl Into) -> Result<()> { let expr = expr.into(); if !self.path().is_file() { return self.write_expr(expr); @@ -159,7 +159,7 @@ impl TestFile { Ok(()) } /// Check that the provided expression matches the file contents. - pub fn compare_debug(&self, expr: impl Into) -> Result<()> { + pub fn compare_debug(&self, expr: impl Into) -> Result<()> { let expr = expr.into(); if !self.path().is_file() { return self.write_expr(expr); @@ -176,10 +176,7 @@ impl TestFile { Ok(()) } /// Check that the provided expression matches the file contents. - pub fn compare_binary( - &self, - expr: impl Into, - ) -> Result<()> { + pub fn compare_binary(&self, expr: impl Into) -> Result<()> { let expr = expr.into(); match self { TestFile::Binary(_) => {} -- cgit v1.2.3