1
Fork 0

Fix long lines

This commit is contained in:
Tim Chevalier 2012-09-25 19:12:50 -07:00
parent 7acf89c022
commit 473a866733
2 changed files with 5 additions and 4 deletions

View file

@ -101,8 +101,8 @@ pure fn to_either<T: Copy, U: Copy>(res: &Result<U, T>) -> Either<T, U> {
* ok(parse_bytes(buf))
* }
*/
fn chain<T, U: Copy, V: Copy>(+res: Result<T, V>, op: fn(+t: T) -> Result<U, V>)
-> Result<U, V> {
fn chain<T, U: Copy, V: Copy>(+res: Result<T, V>, op: fn(+t: T)
-> Result<U, V>) -> Result<U, V> {
// XXX: Should be writable with move + match
if res.is_ok() {
op(unwrap(res))

View file

@ -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))]));