diff options
author | Nadrieril Feneanar | 2020-02-19 17:25:57 +0000 |
---|---|---|
committer | GitHub | 2020-02-19 17:25:57 +0000 |
commit | ffbde252a850c7d96e1000e1be52792c41733a28 (patch) | |
tree | e668b7f764fb4981a802bc619e0b2ff62fa9ce16 /dhall/src/syntax/ast/import.rs | |
parent | e4b3a879907b6dcc75d25847ae21a23d0201aae1 (diff) | |
parent | 7cbfc1a0d32766a383d1f48902502adaa2234d2f (diff) |
Merge pull request #131 from Nadrieril/hir
Decouple main expression types
Diffstat (limited to 'dhall/src/syntax/ast/import.rs')
-rw-r--r-- | dhall/src/syntax/ast/import.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/dhall/src/syntax/ast/import.rs b/dhall/src/syntax/ast/import.rs index da3e99b..7bde6e0 100644 --- a/dhall/src/syntax/ast/import.rs +++ b/dhall/src/syntax/ast/import.rs @@ -75,15 +75,6 @@ impl<SE> URL<SE> { headers, }) } - pub fn traverse_mut<'a, Err>( - &'a mut self, - f: impl FnOnce(&'a mut SE) -> Result<(), Err>, - ) -> Result<(), Err> { - if let Some(header) = &mut self.headers { - f(header)?; - } - Ok(()) - } } impl<SE> ImportLocation<SE> { @@ -99,15 +90,6 @@ impl<SE> ImportLocation<SE> { Missing => Missing, }) } - pub fn traverse_mut<'a, Err>( - &'a mut self, - f: impl FnOnce(&'a mut SE) -> Result<(), Err>, - ) -> Result<(), Err> { - if let ImportLocation::Remote(url) = self { - url.traverse_mut(f)?; - } - Ok(()) - } } impl<SE> Import<SE> { @@ -121,10 +103,4 @@ impl<SE> Import<SE> { hash: self.hash.clone(), }) } - pub fn traverse_mut<'a, Err>( - &'a mut self, - f: impl FnOnce(&'a mut SE) -> Result<(), Err>, - ) -> Result<(), Err> { - self.location.traverse_mut(f) - } } |