summaryrefslogtreecommitdiff
path: root/dhall_generator
diff options
context:
space:
mode:
authorNadrieril2019-04-18 14:39:56 +0200
committerNadrieril2019-04-18 14:39:56 +0200
commit9474d4939db6f844285182fc15aad74f6aa18e21 (patch)
tree7f14c06afccd10e32c3003555bce809e713d2bfe /dhall_generator
parent69267c7cc108a2f5db35c52a71afaa5be7be7355 (diff)
Remove more duplication
Diffstat (limited to '')
-rw-r--r--dhall_generator/src/quote.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/dhall_generator/src/quote.rs b/dhall_generator/src/quote.rs
index d680288..400c12c 100644
--- a/dhall_generator/src/quote.rs
+++ b/dhall_generator/src/quote.rs
@@ -10,8 +10,8 @@ pub fn expr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap().unnote();
let no_import =
|_: &Import| -> X { panic!("Don't use import in dhall::expr!()") };
- let expr = expr.as_ref().map_embed(no_import);
- let output = quote_expr(&expr, &Context::new());
+ let expr = expr.map_embed(no_import);
+ let output = quote_expr(&expr.unroll(), &Context::new());
output.into()
}
@@ -20,8 +20,8 @@ pub fn subexpr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap().unnote();
let no_import =
|_: &Import| -> X { panic!("Don't use import in dhall::subexpr!()") };
- let expr = expr.as_ref().map_embed(no_import);
- let output = quote_subexpr(&dhall_core::rc(expr), &Context::new());
+ let expr = expr.map_embed(no_import);
+ let output = quote_subexpr(&expr, &Context::new());
output.into()
}