File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -229,17 +229,11 @@ pub mod ct {
229
229
pub fn parse_parameter(s: &str, i: uint, lim: uint) ->
230
230
Parsed<Option<uint>> {
231
231
if i >= lim { return Parsed::new(None, i); }
232
- let num = peek_num(s, i, lim);
233
- return match num {
234
- None => Parsed::new(None, i),
235
- Some(t) => {
236
- let n = t.val;
237
- let j = t.next;
238
- if j < lim && s[j] == '$' as u8 {
239
- Parsed::new(Some(n), j + 1)
240
- } else { Parsed::new(None, i) }
241
- }
242
- };
232
+ match peek_num(s, i, lim) {
233
+ Some(num) if num.next < lim && s[num.next] == '$' as u8 =>
234
+ Parsed::new(Some(num.val), num.next + 1),
235
+ _ => Parsed::new(None, i)
236
+ }
243
237
}
244
238
pub fn parse_flags(s: &str, i: uint, lim: uint) ->
245
239
Parsed<~[Flag]> {
You can’t perform that action at this time.
0 commit comments