diff options
| author | Ashok Gautham <ScriptDevil@gmail.com> | 2013-01-14 10:01:09 +0530 |
|---|---|---|
| committer | Ashok Gautham <ScriptDevil@gmail.com> | 2013-01-14 10:01:09 +0530 |
| commit | e69d491aeaec4402c69d1358d1b64b0bd2847507 (patch) | |
| tree | 0191da4089f2512c2075ef99d35cb60332990190 | |
| parent | a157f1d5bf86c1d929cccb5d1b5b197d3147b760 (diff) | |
Tidied up long lines
| -rw-r--r-- | src/libstd/time.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 5684f8b5810..02ed3692a98 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -320,8 +320,8 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> { Some((value, pos)) } - fn match_digits_in_range(ss: &str, pos: uint, digits: uint, ws: bool, min: i32, max: i32) - -> Option<(i32, uint)> { + fn match_digits_in_range(ss: &str, pos: uint, digits: uint, ws: bool, + min: i32, max: i32) -> Option<(i32, uint)> { match match_digits(ss, pos, digits, ws) { Some((val, pos)) if val >= min && val <= max => { Some((val, pos)) @@ -403,7 +403,8 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> { Some(item) => { let (v, pos) = item; tm.tm_mon = v; Ok(pos) } None => Err(~"Invalid month") }, - 'C' => match match_digits_in_range(s, pos, 2u, false, 0_i32, 99_i32) { + 'C' => match match_digits_in_range(s, pos, 2u, false, 0_i32, + 99_i32) { Some(item) => { let (v, pos) = item; tm.tm_year += (v * 100_i32) - 1900_i32; @@ -429,11 +430,13 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> { .chain(|pos| parse_char(s, pos, '/')) .chain(|pos| parse_type(s, pos, 'y', tm)) } - 'd' => match match_digits_in_range(s, pos, 2u, false, 1_i32, 31_i32) { + 'd' => match match_digits_in_range(s, pos, 2u, false, 1_i32, + 31_i32) { Some(item) => { let (v, pos) = item; tm.tm_mday = v; Ok(pos) } None => Err(~"Invalid day of the month") }, - 'e' => match match_digits_in_range(s, pos, 2u, true, 1_i32, 31_i32) { + 'e' => match match_digits_in_range(s, pos, 2u, true, 1_i32, + 31_i32) { Some(item) => { let (v, pos) = item; tm.tm_mday = v; Ok(pos) } None => Err(~"Invalid day of the month") }, |
