about summary refs log tree commit diff
path: root/src/libregex
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2014-12-07 11:14:43 -0500
committerJorge Aparicio <japaricious@gmail.com>2014-12-13 17:03:46 -0500
commit95d0763707956ec6518694ec0fb8b82a7b3a1261 (patch)
tree885822a9dbff3f78d23516a4d09fdba6df4423fe /src/libregex
parent1c5aac2b308445c7a03cdf9ff4b5457f7adbf1fb (diff)
libregex: use unboxed closures
Diffstat (limited to 'src/libregex')
-rw-r--r--src/libregex/parse.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs
index f7ea83a8a38..ccbd53c4f2a 100644
--- a/src/libregex/parse.rs
+++ b/src/libregex/parse.rs
@@ -888,8 +888,9 @@ impl<'a> Parser<'a> {
     // build_from combines all AST elements starting at 'from' in the
     // parser's stack using 'mk' to combine them. If any such element is not an
     // AST then it is popped off the stack and ignored.
-    fn build_from(&mut self, from: uint, mk: |Ast, Ast| -> Ast)
-                 -> Result<Ast, Error> {
+    fn build_from<F>(&mut self, from: uint, mut mk: F) -> Result<Ast, Error> where
+        F: FnMut(Ast, Ast) -> Ast,
+    {
         if from >= self.stack.len() {
             return self.err("Empty group or alternate not allowed.")
         }