diff options
author | Nadrieril | 2019-03-08 22:37:32 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-08 22:37:32 +0100 |
commit | 66bed8dbc7249e17a89adcbb19406f4126a434de (patch) | |
tree | 211c309fb3aea301314871899d1286b70eafa05c /dhall/tests | |
parent | 0916eafc12b0ccbbf5b524a273903a0a84f30e74 (diff) |
Finally get rid of all the &'i str
Diffstat (limited to 'dhall/tests')
-rw-r--r-- | dhall/tests/macros.rs | 5 |
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) { |