From 737472abf9c0ca2030ab8c2bb0b1d4af41167183 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 31 Mar 2019 19:37:29 +0200 Subject: Remove evil Deref impl --- dhall/src/imports.rs | 4 ++-- dhall/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'dhall') diff --git a/dhall/src/imports.rs b/dhall/src/imports.rs index 8df4e97..96268ca 100644 --- a/dhall/src/imports.rs +++ b/dhall/src/imports.rs @@ -79,9 +79,9 @@ pub fn load_dhall_file( let resolve = |import: &Import| -> Expr { resolve_import(import, &root).unwrap() }; - expr.map_embed(&resolve).squash_embed() + expr.as_ref().map_embed(&resolve).squash_embed() } else { - panic_imports(&expr) + panic_imports(expr.as_ref()) }; Ok(expr) } diff --git a/dhall/src/main.rs b/dhall/src/main.rs index eb2206b..77f558c 100644 --- a/dhall/src/main.rs +++ b/dhall/src/main.rs @@ -65,7 +65,7 @@ fn main() { } }; - let expr: SubExpr<_, _> = rc(imports::panic_imports(&expr)); + let expr: SubExpr<_, _> = rc(imports::panic_imports(expr.as_ref())); let type_expr = match typecheck::type_of(expr.clone()) { Err(e) => { -- cgit v1.2.3