From 81ce30dde067ca0067fda32b1e0ade1dbdfbdf58 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 29 Feb 2020 23:21:18 +0000 Subject: Implement `as Location` imports --- dhall/src/syntax/ast/text.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'dhall/src/syntax') diff --git a/dhall/src/syntax/ast/text.rs b/dhall/src/syntax/ast/text.rs index 83aaf9a..c40f4a1 100644 --- a/dhall/src/syntax/ast/text.rs +++ b/dhall/src/syntax/ast/text.rs @@ -54,16 +54,6 @@ impl InterpolatedTextContents { Text(s) => Text(s.clone()), }) } - pub fn traverse_mut<'a, E, F>(&'a mut self, mut f: F) -> Result<(), E> - where - F: FnMut(&'a mut SubExpr) -> Result<(), E>, - { - use InterpolatedTextContents::Expr; - if let Expr(e) = self { - f(e)?; - } - Ok(()) - } pub fn map_ref<'a, SubExpr2, F>( &'a self, mut f: F, @@ -77,15 +67,6 @@ impl InterpolatedTextContents { Text(s) => Text(s.clone()), } } - pub fn map_mut<'a, F>(&'a mut self, mut f: F) - where - F: FnMut(&'a mut SubExpr), - { - use InterpolatedTextContents::Expr; - if let Expr(e) = self { - f(e); - } - } } impl InterpolatedText { @@ -126,16 +107,6 @@ impl InterpolatedText { }) } - pub fn traverse_mut<'a, E, F>(&'a mut self, mut f: F) -> Result<(), E> - where - F: FnMut(&'a mut SubExpr) -> Result<(), E>, - { - for (e, _) in &mut self.tail { - f(e)? - } - Ok(()) - } - pub fn iter<'a>( &'a self, ) -> impl Iterator> + 'a { -- cgit v1.2.3