Skip to content

Commit f542e78

Browse files
committed
Fix for upstream changes
1 parent 15f2528 commit f542e78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/parse.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,9 @@ impl<'a> Parser<'a> {
838838
// Otherwise, an error will be returned.
839839
// Generally, `allow_start` is only true when you're *not* expecting an
840840
// opening parenthesis.
841-
fn pos_last(&self, allow_start: bool, pred: |&BuildAst| -> bool)
842-
-> Result<uint, Error> {
841+
fn pos_last<F>(&self, allow_start: bool, pred: F)
842+
-> Result<uint, Error>
843+
where F: Fn(&BuildAst) -> bool {
843844
let from = match self.stack.iter().rev().position(pred) {
844845
Some(i) => i,
845846
None => {
@@ -1029,7 +1030,7 @@ fn is_valid_cap(c: char) -> bool {
10291030

10301031
fn find_class(classes: NamedClasses, name: &str) -> Option<Vec<(char, char)>> {
10311032
match classes.binary_search(|&(s, _)| s.cmp(name)) {
1032-
BinarySearchResult::Found(i) => Some(classes[i].val1().to_vec()),
1033+
BinarySearchResult::Found(i) => Some(classes[i].1.to_vec()),
10331034
BinarySearchResult::NotFound(_) => None,
10341035
}
10351036
}

0 commit comments

Comments
 (0)