summaryrefslogtreecommitdiff
path: root/dhall_generator
diff options
context:
space:
mode:
authorNadrieril2019-04-18 13:15:42 +0200
committerNadrieril2019-04-18 13:15:42 +0200
commite68e34f361a29e0661201ac3c93a711a9884833f (patch)
tree04be61c8effd19911f371200d58fc3bb46f32bc9 /dhall_generator
parentcb24b56d83479c0fd95bf4dd09879118f4e3afd6 (diff)
Reduce duplication between mapping functions
Diffstat (limited to 'dhall_generator')
-rw-r--r--dhall_generator/src/quote.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/dhall_generator/src/quote.rs b/dhall_generator/src/quote.rs
index 7128511..d680288 100644
--- a/dhall_generator/src/quote.rs
+++ b/dhall_generator/src/quote.rs
@@ -10,7 +10,7 @@ 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 expr = expr.as_ref().map_embed(no_import);
let output = quote_expr(&expr, &Context::new());
output.into()
}
@@ -20,7 +20,7 @@ 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 expr = expr.as_ref().map_embed(no_import);
let output = quote_subexpr(&dhall_core::rc(expr), &Context::new());
output.into()
}