From 04a2887f8791bb080b4e76a55949a7c1954dbb97 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 18 Jan 2012 22:37:22 -0800 Subject: Remove '.' after nullary tags in patterns Does what it says on the tin. The next commit will remove support for this syntax. --- src/libstd/getopts.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libstd/getopts.rs') diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs index 697ce4035cd..39b6de0e34f 100644 --- a/src/libstd/getopts.rs +++ b/src/libstd/getopts.rs @@ -255,16 +255,16 @@ fn getopts(args: [str], opts: [opt]) -> result { let optid; alt find_opt(opts, nm) { some(id) { optid = id; } - none. { ret err(unrecognized_option(name_str(nm))); } + none { ret err(unrecognized_option(name_str(nm))); } } alt opts[optid].hasarg { - no. { + no { if !option::is_none::(i_arg) { ret err(unexpected_argument(name_str(nm))); } vals[optid] += [given]; } - maybe. { + maybe { if !option::is_none::(i_arg) { vals[optid] += [val(option::get(i_arg))]; } else if name_pos < vec::len::(names) || @@ -272,7 +272,7 @@ fn getopts(args: [str], opts: [opt]) -> result { vals[optid] += [given]; } else { i += 1u; vals[optid] += [val(args[i])]; } } - yes. { + yes { if !option::is_none::(i_arg) { vals[optid] += [val(option::get::(i_arg))]; } else if i + 1u == l { @@ -306,7 +306,7 @@ fn getopts(args: [str], opts: [opt]) -> result { fn opt_vals(m: match, nm: str) -> [optval] { ret alt find_opt(m.opts, mkname(nm)) { some(id) { m.vals[id] } - none. { #error("No option '%s' defined", nm); fail } + none { #error("No option '%s' defined", nm); fail } }; } -- cgit 1.4.1-3-g733a5