From 473a866733b085419b41b2d2f2708a49c079f89e Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Tue, 25 Sep 2012 19:12:50 -0700 Subject: [PATCH] Fix long lines --- src/libcore/result.rs | 6 +++--- src/libstd/json.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 3735d555e2d..7644175f93c 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -101,8 +101,8 @@ pure fn to_either(res: &Result) -> Either { * ok(parse_bytes(buf)) * } */ -fn chain(+res: Result, op: fn(+t: T) -> Result) - -> Result { +fn chain(+res: Result, op: fn(+t: T) + -> Result) -> Result { // XXX: Should be writable with move + match if res.is_ok() { op(unwrap(res)) @@ -309,7 +309,7 @@ fn map_opt( * to accommodate an error like the vectors being of different lengths. */ fn map_vec2(ss: &[S], ts: &[T], - op: fn((&S),(&T)) -> Result) -> Result<~[V],U> { + op: fn((&S),(&T)) -> Result) -> Result<~[V],U> { assert vec::same_length(ss, ts); let n = vec::len(ts); diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 2002e143ffa..db22b9ff30b 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -1048,7 +1048,8 @@ mod tests { mk_dict(~[ (~"a", Null), (~"b", Boolean(true))])); - assert eq(result::get(&from_str(~"\n{ \"a\": null, \"b\" : true }\n")), + assert eq(result::get(&from_str( + ~"\n{ \"a\": null, \"b\" : true }\n")), mk_dict(~[ (~"a", Null), (~"b", Boolean(true))]));