From 9474d4939db6f844285182fc15aad74f6aa18e21 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 18 Apr 2019 14:39:56 +0200 Subject: Remove more duplication --- dhall/src/imports.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dhall/src/imports.rs') diff --git a/dhall/src/imports.rs b/dhall/src/imports.rs index b6dd80b..e367725 100644 --- a/dhall/src/imports.rs +++ b/dhall/src/imports.rs @@ -98,8 +98,8 @@ fn do_resolve_expr<'a>( } } }; - let expr = expr.as_ref().traverse_embed(resolve)?; - Ok(Resolved(rc(expr))) + let expr = expr.traverse_embed(resolve)?; + Ok(Resolved(expr)) } fn skip_resolve_expr( @@ -109,8 +109,8 @@ fn skip_resolve_expr( |import: &Import| -> Result, ImportError> { Err(ImportError::UnexpectedImport(import.clone())) }; - let expr = expr.as_ref().traverse_embed(&resolve)?; - Ok(Resolved(rc(expr))) + let expr = expr.traverse_embed(resolve)?; + Ok(Resolved(expr)) } impl<'a> Parsed<'a> { -- cgit v1.2.3