File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -838,8 +838,9 @@ impl<'a> Parser<'a> {
838
838
// Otherwise, an error will be returned.
839
839
// Generally, `allow_start` is only true when you're *not* expecting an
840
840
// 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 {
843
844
let from = match self . stack . iter ( ) . rev ( ) . position ( pred) {
844
845
Some ( i) => i,
845
846
None => {
@@ -1029,7 +1030,7 @@ fn is_valid_cap(c: char) -> bool {
1029
1030
1030
1031
fn find_class ( classes : NamedClasses , name : & str ) -> Option < Vec < ( char , char ) > > {
1031
1032
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 ( ) ) ,
1033
1034
BinarySearchResult :: NotFound ( _) => None ,
1034
1035
}
1035
1036
}
You can’t perform that action at this time.
0 commit comments