aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/tree.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/util/tree.rs')
-rw-r--r--src/components/util/tree.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/util/tree.rs b/src/components/util/tree.rs
index 23b8ca80d77..94ceb5e1b36 100644
--- a/src/components/util/tree.rs
+++ b/src/components/util/tree.rs
@@ -152,7 +152,8 @@ impl<NR:TreeNodeRef<N>,N:TreeNode<NR>> TreeUtils for NR {
}
for self.each_child |kid| {
- if !kid.traverse_preorder(callback) {
+ // FIXME: Work around rust#2202. We should be able to pass the callback directly.
+ if !kid.traverse_preorder(|a| callback(a)) {
return false;
}
}
@@ -162,7 +163,8 @@ impl<NR:TreeNodeRef<N>,N:TreeNode<NR>> TreeUtils for NR {
fn traverse_postorder(&self, callback: &fn(NR) -> bool) -> bool {
for self.each_child |kid| {
- if !kid.traverse_postorder(callback) {
+ // FIXME: Work around rust#2202. We should be able to pass the callback directly.
+ if !kid.traverse_postorder(|a| callback(a)) {
return false;
}
}