Skip to content

Commit e69d491

Browse files
committed
Tidied up long lines
1 parent a157f1d commit e69d491

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/libstd/time.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
320320
Some((value, pos))
321321
}
322322

323-
fn match_digits_in_range(ss: &str, pos: uint, digits: uint, ws: bool, min: i32, max: i32)
324-
-> Option<(i32, uint)> {
323+
fn match_digits_in_range(ss: &str, pos: uint, digits: uint, ws: bool,
324+
min: i32, max: i32) -> Option<(i32, uint)> {
325325
match match_digits(ss, pos, digits, ws) {
326326
Some((val, pos)) if val >= min && val <= max => {
327327
Some((val, pos))
@@ -403,7 +403,8 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
403403
Some(item) => { let (v, pos) = item; tm.tm_mon = v; Ok(pos) }
404404
None => Err(~"Invalid month")
405405
},
406-
'C' => match match_digits_in_range(s, pos, 2u, false, 0_i32, 99_i32) {
406+
'C' => match match_digits_in_range(s, pos, 2u, false, 0_i32,
407+
99_i32) {
407408
Some(item) => {
408409
let (v, pos) = item;
409410
tm.tm_year += (v * 100_i32) - 1900_i32;
@@ -429,11 +430,13 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
429430
.chain(|pos| parse_char(s, pos, '/'))
430431
.chain(|pos| parse_type(s, pos, 'y', tm))
431432
}
432-
'd' => match match_digits_in_range(s, pos, 2u, false, 1_i32, 31_i32) {
433+
'd' => match match_digits_in_range(s, pos, 2u, false, 1_i32,
434+
31_i32) {
433435
Some(item) => { let (v, pos) = item; tm.tm_mday = v; Ok(pos) }
434436
None => Err(~"Invalid day of the month")
435437
},
436-
'e' => match match_digits_in_range(s, pos, 2u, true, 1_i32, 31_i32) {
438+
'e' => match match_digits_in_range(s, pos, 2u, true, 1_i32,
439+
31_i32) {
437440
Some(item) => { let (v, pos) = item; tm.tm_mday = v; Ok(pos) }
438441
None => Err(~"Invalid day of the month")
439442
},

0 commit comments

Comments
 (0)