summaryrefslogtreecommitdiff
path: root/dhall/tests/macros.rs
diff options
context:
space:
mode:
authorNadrieril2019-03-08 22:37:32 +0100
committerNadrieril2019-03-08 22:37:32 +0100
commit66bed8dbc7249e17a89adcbb19406f4126a434de (patch)
tree211c309fb3aea301314871899d1286b70eafa05c /dhall/tests/macros.rs
parent0916eafc12b0ccbbf5b524a273903a0a84f30e74 (diff)
Finally get rid of all the &'i str
Diffstat (limited to '')
-rw-r--r--dhall/tests/macros.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/dhall/tests/macros.rs b/dhall/tests/macros.rs
index a126d5b..619742e 100644
--- a/dhall/tests/macros.rs
+++ b/dhall/tests/macros.rs
@@ -80,10 +80,11 @@ pub enum ExpectedResult {
pub fn read_dhall_file<'i>(
file_path: &str,
mut buffer: &'i mut String,
-) -> Result<Box<Expr<'i, X, Import>>, ParseError> {
+) -> Result<Box<Expr_<String, X, Import>>, ParseError> {
let mut file = File::open(&file_path).unwrap();
file.read_to_string(&mut buffer).unwrap();
- parser::parse_expr(&*buffer)
+ let expr = parser::parse_expr(&*buffer)?;
+ Ok(Box::new(expr.take_ownership_of_labels()))
}
pub fn run_test(base_path: &str, feature: Feature, expected: ExpectedResult) {