1
Fork 0

Long lines

This commit is contained in:
Brian Anderson 2012-09-28 02:26:20 -07:00
parent bc9efaad9c
commit a09a49627e
9 changed files with 77 additions and 67 deletions

View file

@ -718,7 +718,7 @@ mod tests {
// send to other readers // send to other readers
for vec::each(reader_convos) |x| { for vec::each(reader_convos) |x| {
match *x { match *x {
(rc, _) => rc.send(()), (ref rc, _) => rc.send(()),
} }
} }
} }
@ -727,7 +727,7 @@ mod tests {
// complete handshake with other readers // complete handshake with other readers
for vec::each(reader_convos) |x| { for vec::each(reader_convos) |x| {
match *x { match *x {
(_, rp) => rp.recv(), (_, ref rp) => rp.recv(),
} }
} }
wc1.send(()); // tell writer to try again wc1.send(()); // tell writer to try again

View file

@ -199,10 +199,18 @@ enum Fail_ {
/// Convert a `fail_` enum into an error string /// Convert a `fail_` enum into an error string
fn fail_str(+f: Fail_) -> ~str { fn fail_str(+f: Fail_) -> ~str {
return match f { return match f {
ArgumentMissing(ref nm) => ~"Argument to option '" + *nm + ~"' missing.", ArgumentMissing(ref nm) => {
UnrecognizedOption(ref nm) => ~"Unrecognized option: '" + *nm + ~"'.", ~"Argument to option '" + *nm + ~"' missing."
OptionMissing(ref nm) => ~"Required option '" + *nm + ~"' missing.", }
OptionDuplicated(ref nm) => ~"Option '" + *nm + ~"' given more than once.", UnrecognizedOption(ref nm) => {
~"Unrecognized option: '" + *nm + ~"'."
}
OptionMissing(ref nm) => {
~"Required option '" + *nm + ~"' missing."
}
OptionDuplicated(ref nm) => {
~"Option '" + *nm + ~"' given more than once."
}
UnexpectedArgument(ref nm) => { UnexpectedArgument(ref nm) => {
~"Option " + *nm + ~" does not take an argument." ~"Option " + *nm + ~" does not take an argument."
} }
@ -476,7 +484,7 @@ mod tests {
let opts = ~[reqopt(~"test")]; let opts = ~[reqopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"test")); assert (opt_present(m, ~"test"));
assert (opt_str(m, ~"test") == ~"20"); assert (opt_str(m, ~"test") == ~"20");
} }
@ -490,7 +498,7 @@ mod tests {
let opts = ~[reqopt(~"test")]; let opts = ~[reqopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionMissing_), Err(copy f) => check_fail_type(f, OptionMissing_),
_ => fail _ => fail
} }
} }
@ -501,7 +509,7 @@ mod tests {
let opts = ~[reqopt(~"test")]; let opts = ~[reqopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, ArgumentMissing_), Err(copy f) => check_fail_type(f, ArgumentMissing_),
_ => fail _ => fail
} }
} }
@ -512,7 +520,7 @@ mod tests {
let opts = ~[reqopt(~"test")]; let opts = ~[reqopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionDuplicated_), Err(copy f) => check_fail_type(f, OptionDuplicated_),
_ => fail _ => fail
} }
} }
@ -523,7 +531,7 @@ mod tests {
let opts = ~[reqopt(~"t")]; let opts = ~[reqopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"t")); assert (opt_present(m, ~"t"));
assert (opt_str(m, ~"t") == ~"20"); assert (opt_str(m, ~"t") == ~"20");
} }
@ -537,7 +545,7 @@ mod tests {
let opts = ~[reqopt(~"t")]; let opts = ~[reqopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionMissing_), Err(copy f) => check_fail_type(f, OptionMissing_),
_ => fail _ => fail
} }
} }
@ -548,7 +556,7 @@ mod tests {
let opts = ~[reqopt(~"t")]; let opts = ~[reqopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, ArgumentMissing_), Err(copy f) => check_fail_type(f, ArgumentMissing_),
_ => fail _ => fail
} }
} }
@ -559,7 +567,7 @@ mod tests {
let opts = ~[reqopt(~"t")]; let opts = ~[reqopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionDuplicated_), Err(copy f) => check_fail_type(f, OptionDuplicated_),
_ => fail _ => fail
} }
} }
@ -572,7 +580,7 @@ mod tests {
let opts = ~[optopt(~"test")]; let opts = ~[optopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"test")); assert (opt_present(m, ~"test"));
assert (opt_str(m, ~"test") == ~"20"); assert (opt_str(m, ~"test") == ~"20");
} }
@ -586,7 +594,7 @@ mod tests {
let opts = ~[optopt(~"test")]; let opts = ~[optopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (!opt_present(m, ~"test")), Ok(copy m) => assert (!opt_present(m, ~"test")),
_ => fail _ => fail
} }
} }
@ -597,7 +605,7 @@ mod tests {
let opts = ~[optopt(~"test")]; let opts = ~[optopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, ArgumentMissing_), Err(copy f) => check_fail_type(f, ArgumentMissing_),
_ => fail _ => fail
} }
} }
@ -608,7 +616,7 @@ mod tests {
let opts = ~[optopt(~"test")]; let opts = ~[optopt(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionDuplicated_), Err(copy f) => check_fail_type(f, OptionDuplicated_),
_ => fail _ => fail
} }
} }
@ -619,7 +627,7 @@ mod tests {
let opts = ~[optopt(~"t")]; let opts = ~[optopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"t")); assert (opt_present(m, ~"t"));
assert (opt_str(m, ~"t") == ~"20"); assert (opt_str(m, ~"t") == ~"20");
} }
@ -633,7 +641,7 @@ mod tests {
let opts = ~[optopt(~"t")]; let opts = ~[optopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (!opt_present(m, ~"t")), Ok(copy m) => assert (!opt_present(m, ~"t")),
_ => fail _ => fail
} }
} }
@ -644,7 +652,7 @@ mod tests {
let opts = ~[optopt(~"t")]; let opts = ~[optopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, ArgumentMissing_), Err(copy f) => check_fail_type(f, ArgumentMissing_),
_ => fail _ => fail
} }
} }
@ -655,7 +663,7 @@ mod tests {
let opts = ~[optopt(~"t")]; let opts = ~[optopt(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionDuplicated_), Err(copy f) => check_fail_type(f, OptionDuplicated_),
_ => fail _ => fail
} }
} }
@ -668,7 +676,7 @@ mod tests {
let opts = ~[optflag(~"test")]; let opts = ~[optflag(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (opt_present(m, ~"test")), Ok(copy m) => assert (opt_present(m, ~"test")),
_ => fail _ => fail
} }
} }
@ -679,7 +687,7 @@ mod tests {
let opts = ~[optflag(~"test")]; let opts = ~[optflag(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (!opt_present(m, ~"test")), Ok(copy m) => assert (!opt_present(m, ~"test")),
_ => fail _ => fail
} }
} }
@ -690,7 +698,7 @@ mod tests {
let opts = ~[optflag(~"test")]; let opts = ~[optflag(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => { Err(copy f) => {
log(error, fail_str(f)); log(error, fail_str(f));
check_fail_type(f, UnexpectedArgument_); check_fail_type(f, UnexpectedArgument_);
} }
@ -704,7 +712,7 @@ mod tests {
let opts = ~[optflag(~"test")]; let opts = ~[optflag(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionDuplicated_), Err(copy f) => check_fail_type(f, OptionDuplicated_),
_ => fail _ => fail
} }
} }
@ -715,7 +723,7 @@ mod tests {
let opts = ~[optflag(~"t")]; let opts = ~[optflag(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (opt_present(m, ~"t")), Ok(copy m) => assert (opt_present(m, ~"t")),
_ => fail _ => fail
} }
} }
@ -726,7 +734,7 @@ mod tests {
let opts = ~[optflag(~"t")]; let opts = ~[optflag(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (!opt_present(m, ~"t")), Ok(copy m) => assert (!opt_present(m, ~"t")),
_ => fail _ => fail
} }
} }
@ -737,7 +745,7 @@ mod tests {
let opts = ~[optflag(~"t")]; let opts = ~[optflag(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(ref m) => {
// The next variable after the flag is just a free argument // The next variable after the flag is just a free argument
assert (m.free[0] == ~"20"); assert (m.free[0] == ~"20");
@ -752,7 +760,7 @@ mod tests {
let opts = ~[optflag(~"t")]; let opts = ~[optflag(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, OptionDuplicated_), Err(copy f) => check_fail_type(f, OptionDuplicated_),
_ => fail _ => fail
} }
} }
@ -765,7 +773,7 @@ mod tests {
let opts = ~[optmulti(~"test")]; let opts = ~[optmulti(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"test")); assert (opt_present(m, ~"test"));
assert (opt_str(m, ~"test") == ~"20"); assert (opt_str(m, ~"test") == ~"20");
} }
@ -779,7 +787,7 @@ mod tests {
let opts = ~[optmulti(~"test")]; let opts = ~[optmulti(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (!opt_present(m, ~"test")), Ok(copy m) => assert (!opt_present(m, ~"test")),
_ => fail _ => fail
} }
} }
@ -790,7 +798,7 @@ mod tests {
let opts = ~[optmulti(~"test")]; let opts = ~[optmulti(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, ArgumentMissing_), Err(copy f) => check_fail_type(f, ArgumentMissing_),
_ => fail _ => fail
} }
} }
@ -801,7 +809,7 @@ mod tests {
let opts = ~[optmulti(~"test")]; let opts = ~[optmulti(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"test")); assert (opt_present(m, ~"test"));
assert (opt_str(m, ~"test") == ~"20"); assert (opt_str(m, ~"test") == ~"20");
let pair = opt_strs(m, ~"test"); let pair = opt_strs(m, ~"test");
@ -818,7 +826,7 @@ mod tests {
let opts = ~[optmulti(~"t")]; let opts = ~[optmulti(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"t")); assert (opt_present(m, ~"t"));
assert (opt_str(m, ~"t") == ~"20"); assert (opt_str(m, ~"t") == ~"20");
} }
@ -832,7 +840,7 @@ mod tests {
let opts = ~[optmulti(~"t")]; let opts = ~[optmulti(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => assert (!opt_present(m, ~"t")), Ok(copy m) => assert (!opt_present(m, ~"t")),
_ => fail _ => fail
} }
} }
@ -843,7 +851,7 @@ mod tests {
let opts = ~[optmulti(~"t")]; let opts = ~[optmulti(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, ArgumentMissing_), Err(copy f) => check_fail_type(f, ArgumentMissing_),
_ => fail _ => fail
} }
} }
@ -854,7 +862,7 @@ mod tests {
let opts = ~[optmulti(~"t")]; let opts = ~[optmulti(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (opt_present(m, ~"t")); assert (opt_present(m, ~"t"));
assert (opt_str(m, ~"t") == ~"20"); assert (opt_str(m, ~"t") == ~"20");
let pair = opt_strs(m, ~"t"); let pair = opt_strs(m, ~"t");
@ -871,7 +879,7 @@ mod tests {
let opts = ~[optmulti(~"t")]; let opts = ~[optmulti(~"t")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, UnrecognizedOption_), Err(copy f) => check_fail_type(f, UnrecognizedOption_),
_ => fail _ => fail
} }
} }
@ -882,7 +890,7 @@ mod tests {
let opts = ~[optmulti(~"test")]; let opts = ~[optmulti(~"test")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Err(f) => check_fail_type(f, UnrecognizedOption_), Err(copy f) => check_fail_type(f, UnrecognizedOption_),
_ => fail _ => fail
} }
} }
@ -899,7 +907,7 @@ mod tests {
optopt(~"notpresent")]; optopt(~"notpresent")];
let rs = getopts(args, opts); let rs = getopts(args, opts);
match rs { match rs {
Ok(m) => { Ok(copy m) => {
assert (m.free[0] == ~"prog"); assert (m.free[0] == ~"prog");
assert (m.free[1] == ~"free1"); assert (m.free[1] == ~"free1");
assert (opt_str(m, ~"s") == ~"20"); assert (opt_str(m, ~"s") == ~"20");
@ -924,8 +932,8 @@ mod tests {
let args = ~[~"-e", ~"foo", ~"--encrypt", ~"foo"]; let args = ~[~"-e", ~"foo", ~"--encrypt", ~"foo"];
let opts = ~[optopt(~"e"), optopt(~"encrypt")]; let opts = ~[optopt(~"e"), optopt(~"encrypt")];
let matches = match getopts(args, opts) { let matches = match getopts(args, opts) {
result::Ok(m) => m, result::Ok(move m) => m,
result::Err(_f) => fail result::Err(_) => fail
}; };
assert opts_present(matches, ~[~"e"]); assert opts_present(matches, ~[~"e"]);
assert opts_present(matches, ~[~"encrypt"]); assert opts_present(matches, ~[~"encrypt"]);
@ -945,8 +953,8 @@ mod tests {
let args = ~[~"-Lfoo"]; let args = ~[~"-Lfoo"];
let opts = ~[optmulti(~"L")]; let opts = ~[optmulti(~"L")];
let matches = match getopts(args, opts) { let matches = match getopts(args, opts) {
result::Ok(m) => m, result::Ok(move m) => m,
result::Err(_f) => fail result::Err(_) => fail
}; };
assert opts_present(matches, ~[~"L"]); assert opts_present(matches, ~[~"L"]);
assert opts_str(matches, ~[~"L"]) == ~"foo"; assert opts_str(matches, ~[~"L"]) == ~"foo";

View file

@ -1133,7 +1133,7 @@ mod tests {
for items.each |item| { for items.each |item| {
match *item { match *item {
(key, value) => { d.insert(copy key, copy value); }, (copy key, copy value) => { d.insert(key, value); },
} }
}; };

View file

@ -329,11 +329,11 @@ mod test {
#[test] #[test]
fn test_ip_ipv4_bad_parse() { fn test_ip_ipv4_bad_parse() {
match v4::try_parse_addr(~"b4df00d") { match v4::try_parse_addr(~"b4df00d") {
result::Err(err_info) => { result::Err(ref err_info) => {
log(debug, fmt!("got error as expected %?", err_info)); log(debug, fmt!("got error as expected %?", err_info));
assert true; assert true;
} }
result::Ok(addr) => { result::Ok(ref addr) => {
fail fmt!("Expected failure, but got addr %?", addr); fail fmt!("Expected failure, but got addr %?", addr);
} }
} }
@ -342,11 +342,11 @@ mod test {
#[ignore(target_os="win32")] #[ignore(target_os="win32")]
fn test_ip_ipv6_bad_parse() { fn test_ip_ipv6_bad_parse() {
match v6::try_parse_addr(~"::,~2234k;") { match v6::try_parse_addr(~"::,~2234k;") {
result::Err(err_info) => { result::Err(ref err_info) => {
log(debug, fmt!("got error as expected %?", err_info)); log(debug, fmt!("got error as expected %?", err_info));
assert true; assert true;
} }
result::Ok(addr) => { result::Ok(ref addr) => {
fail fmt!("Expected failure, but got addr %?", addr); fail fmt!("Expected failure, but got addr %?", addr);
} }
} }

View file

@ -703,7 +703,8 @@ fn listen_common(+host_ip: ip::IpAddr, port: uint, backlog: uint,
stream_closed_po.recv(); stream_closed_po.recv();
match kill_result { match kill_result {
// some failure post bind/listen // some failure post bind/listen
Some(ref err_data) => result::Err(GenericListenErr(err_data.err_name, Some(ref err_data) => result::Err(GenericListenErr(
err_data.err_name,
err_data.err_msg)), err_data.err_msg)),
// clean exit // clean exit
None => result::Ok(()) None => result::Ok(())

View file

@ -1239,7 +1239,7 @@ mod tests {
*x.content, x.byte_offset, *x.content, x.byte_offset,
x.byte_offset + x.byte_len); x.byte_offset + x.byte_len);
} }
node::Concat(x) => { node::Concat(ref x) => {
aux(str, x.left); aux(str, x.left);
aux(str, x.right); aux(str, x.right);
} }

View file

@ -23,8 +23,8 @@ pub fn mkdtemp(tmpdir: &Path, suffix: &str) -> Option<Path> {
fn test_mkdtemp() { fn test_mkdtemp() {
let r = mkdtemp(&Path("."), "foobar"); let r = mkdtemp(&Path("."), "foobar");
match r { match r {
Some(p) => { Some(ref p) => {
os::remove_dir(&p); os::remove_dir(p);
assert(str::ends_with(p.to_str(), "foobar")); assert(str::ends_with(p.to_str(), "foobar"));
} }
_ => assert(false) _ => assert(false)

View file

@ -124,7 +124,8 @@ fn run_tests_console(opts: &TestOpts,
let noun = if st.total != 1u { ~"tests" } else { ~"test" }; let noun = if st.total != 1u { ~"tests" } else { ~"test" };
st.out.write_line(fmt!("\nrunning %u %s", st.total, noun)); st.out.write_line(fmt!("\nrunning %u %s", st.total, noun));
} }
TeWait(ref test) => st.out.write_str(fmt!("test %s ... ", test.name)), TeWait(ref test) => st.out.write_str(
fmt!("test %s ... ", test.name)),
TeResult(copy test, result) => { TeResult(copy test, result) => {
match st.log_out { match st.log_out {
Some(f) => write_log(f, result, &test), Some(f) => write_log(f, result, &test),
@ -490,7 +491,7 @@ mod tests {
fn first_free_arg_should_be_a_filter() { fn first_free_arg_should_be_a_filter() {
let args = ~[~"progname", ~"filter"]; let args = ~[~"progname", ~"filter"];
let opts = match parse_opts(args) { let opts = match parse_opts(args) {
either::Left(o) => o, either::Left(copy o) => o,
_ => fail ~"Malformed arg in first_free_arg_should_be_a_filter" _ => fail ~"Malformed arg in first_free_arg_should_be_a_filter"
}; };
assert ~"filter" == opts.filter.get(); assert ~"filter" == opts.filter.get();
@ -500,7 +501,7 @@ mod tests {
fn parse_ignored_flag() { fn parse_ignored_flag() {
let args = ~[~"progname", ~"filter", ~"--ignored"]; let args = ~[~"progname", ~"filter", ~"--ignored"];
let opts = match parse_opts(args) { let opts = match parse_opts(args) {
either::Left(o) => o, either::Left(copy o) => o,
_ => fail ~"Malformed arg in parse_ignored_flag" _ => fail ~"Malformed arg in parse_ignored_flag"
}; };
assert (opts.run_ignored); assert (opts.run_ignored);
@ -563,7 +564,7 @@ mod tests {
for vec::each(pairs) |p| { for vec::each(pairs) |p| {
match *p { match *p {
(a, b) => { assert (a == b.name); } (ref a, ref b) => { assert (*a == b.name); }
} }
} }
} }

View file

@ -978,7 +978,7 @@ mod tests {
tzset(); tzset();
match strptime(~"", ~"") { match strptime(~"", ~"") {
Ok(tm) => { Ok(ref tm) => {
assert tm.tm_sec == 0_i32; assert tm.tm_sec == 0_i32;
assert tm.tm_min == 0_i32; assert tm.tm_min == 0_i32;
assert tm.tm_hour == 0_i32; assert tm.tm_hour == 0_i32;
@ -1000,8 +1000,8 @@ mod tests {
== Err(~"Invalid time"); == Err(~"Invalid time");
match strptime(~"Fri Feb 13 15:31:30 2009", format) { match strptime(~"Fri Feb 13 15:31:30 2009", format) {
Err(e) => fail e, Err(copy e) => fail e,
Ok(tm) => { Ok(ref tm) => {
assert tm.tm_sec == 30_i32; assert tm.tm_sec == 30_i32;
assert tm.tm_min == 31_i32; assert tm.tm_min == 31_i32;
assert tm.tm_hour == 15_i32; assert tm.tm_hour == 15_i32;
@ -1019,8 +1019,8 @@ mod tests {
fn test(s: &str, format: &str) -> bool { fn test(s: &str, format: &str) -> bool {
match strptime(s, format) { match strptime(s, format) {
Ok(tm) => tm.strftime(format) == str::from_slice(s), Ok(ref tm) => tm.strftime(format) == str::from_slice(s),
Err(e) => fail e Err(copy e) => fail e
} }
} }