@@ -100,7 +100,7 @@ pub fn generate_branchified_method(
100
100
)
101
101
for & c in branch. matches . iter ( ) {
102
102
let next_prefix = format ! ( "{}{}" , prefix, c as char ) ;
103
- w ! ( format!( "Ok(b) if b == '{}' as u8 => match {} \\ {" , c as char , read_call) ) ;
103
+ w ! ( format!( "Ok(b) if b == '{}' as u8 => match {} { {" , c as char , read_call) ) ;
104
104
for b in branch. children . iter ( ) {
105
105
try!( r ( writer, b, next_prefix. as_slice ( ) , indent + 1 , read_call, end, max_len, valid, unknown) ) ;
106
106
}
@@ -124,7 +124,7 @@ pub fn generate_branchified_method(
124
124
}
125
125
)
126
126
127
- w ! ( format!( "let (s, next_byte) = match {} \\ {" , read_call) ) ;
127
+ w ! ( format!( "let (s, next_byte) = match {} { {" , read_call) ) ;
128
128
for b in branches. iter ( ) {
129
129
try!( r ( writer, b, "" , indent + 1 , read_call, end, max_len, valid, unknown) ) ;
130
130
}
@@ -136,10 +136,10 @@ pub fn generate_branchified_method(
136
136
w ! ( ( "let mut s = String::from_str(s);" ) ) ;
137
137
w ! ( ( "s.push_char(next_byte as char);" ) ) ;
138
138
w ! ( ( "loop {" ) ) ;
139
- w ! ( format!( " match {} \\ {" , read_call) ) ;
139
+ w ! ( format!( " match {} { {" , read_call) ) ;
140
140
w ! ( format!( " Ok(b) if b == {} => return Ok({})," , end, unknown. replace( "{}" , "s" ) ) ) ;
141
- w ! ( format!( " Ok(b) if {} => \\ {" , valid) ) ;
142
- w ! ( format!( " if s.len() == {} \\ {" , max_len) ) ;
141
+ w ! ( format!( " Ok(b) if {} => { {" , valid) ) ;
142
+ w ! ( format!( " if s.len() == {} { {" , max_len) ) ;
143
143
w ! ( ( " // Too long; bad request" ) ) ;
144
144
w ! ( ( " return Err(::std::io::IoError { kind: ::std::io::OtherIoError, desc: \" too long, bad request\" , detail: None });" ) ) ;
145
145
w ! ( ( " }" ) ) ;
0 commit comments