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_core/src/visitor.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'dhall_core/src/visitor.rs') diff --git a/dhall_core/src/visitor.rs b/dhall_core/src/visitor.rs index c2b0d06..16ad418 100644 --- a/dhall_core/src/visitor.rs +++ b/dhall_core/src/visitor.rs @@ -472,36 +472,6 @@ where } } -pub struct TraverseRefSimpleVisitor { - pub visit_subexpr: F1, -} - -impl<'a, SE, L, N, E, SE2, Err, F1> - ExprFFallibleVisitor<'a, SE, SE2, L, L, N, N, E, E> - for TraverseRefSimpleVisitor -where - SE: 'a, - L: Ord + Clone + 'a, - N: Clone + 'a, - E: Clone + 'a, - F1: FnMut(&'a SE) -> Result, -{ - type Error = Err; - - fn visit_subexpr(&mut self, subexpr: &'a SE) -> Result { - (self.visit_subexpr)(subexpr) - } - fn visit_note(self, note: &'a N) -> Result { - Ok(N::clone(note)) - } - fn visit_embed(self, embed: &'a E) -> Result { - Ok(E::clone(embed)) - } - fn visit_label(&mut self, label: &'a L) -> Result { - Ok(L::clone(label)) - } -} - pub struct TraverseEmbedVisitor(pub F1); impl<'a, 'b, N, E, E2, Err, F1> -- cgit v1.2.3