diff options
author | Nadrieril | 2019-04-18 14:39:56 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-18 14:39:56 +0200 |
commit | 9474d4939db6f844285182fc15aad74f6aa18e21 (patch) | |
tree | 7f14c06afccd10e32c3003555bce809e713d2bfe /dhall_core/src/visitor.rs | |
parent | 69267c7cc108a2f5db35c52a71afaa5be7be7355 (diff) |
Remove more duplication
Diffstat (limited to 'dhall_core/src/visitor.rs')
-rw-r--r-- | dhall_core/src/visitor.rs | 30 |
1 files changed, 0 insertions, 30 deletions
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<F1> { - 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<F1> -where - SE: 'a, - L: Ord + Clone + 'a, - N: Clone + 'a, - E: Clone + 'a, - F1: FnMut(&'a SE) -> Result<SE2, Err>, -{ - type Error = Err; - - fn visit_subexpr(&mut self, subexpr: &'a SE) -> Result<SE2, Self::Error> { - (self.visit_subexpr)(subexpr) - } - fn visit_note(self, note: &'a N) -> Result<N, Self::Error> { - Ok(N::clone(note)) - } - fn visit_embed(self, embed: &'a E) -> Result<E, Self::Error> { - Ok(E::clone(embed)) - } - fn visit_label(&mut self, label: &'a L) -> Result<L, Self::Error> { - Ok(L::clone(label)) - } -} - pub struct TraverseEmbedVisitor<F1>(pub F1); impl<'a, 'b, N, E, E2, Err, F1> |