summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-03-31 19:37:29 +0200
committerNadrieril2019-03-31 19:37:29 +0200
commit737472abf9c0ca2030ab8c2bb0b1d4af41167183 (patch)
treea9477b48c7e029e5726c7faa54934bb429fd0ee6 /dhall
parent7374d0524ccd53b256107667b213597c05720d2d (diff)
Remove evil Deref impl
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/imports.rs4
-rw-r--r--dhall/src/main.rs2
2 files changed, 3 insertions, 3 deletions
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<X, X> {
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) => {