From 259636a112804b94530c409a468b97d4366bb0d3 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Thu, 26 Jan 2012 08:39:45 -0800 Subject: core: rename vec::position* functions Almost all of the vec functions that predicates don't have a corresponding function that takes a single element, so this commit renames the common fn usecase to be the default. --- src/libstd/getopts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs index b870dde34c6..c517a2f996d 100644 --- a/src/libstd/getopts.rs +++ b/src/libstd/getopts.rs @@ -149,7 +149,7 @@ fn name_str(nm: name) -> str { } fn find_opt(opts: [opt], nm: name) -> option::t { - vec::position_pred(opts, { |opt| opt.name == nm }) + vec::position(opts, { |opt| opt.name == nm }) } /* -- cgit 1.4.1-3-g733a5 From 5b2c0a999fd9d0a92c82f2615a00cd13ced7a077 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 27 Jan 2012 20:39:16 -0800 Subject: std: Whitespace cleanup. --- src/libstd/map.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/map.rs b/src/libstd/map.rs index ed37318246b..09eb1534f93 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -95,6 +95,7 @@ iface map { Iterate over all the keys in the map */ fn keys(fn(K)); + /* Iterate over all the values in the map */ @@ -631,4 +632,4 @@ mod tests { map.insert(key, "val"); assert (option::get(map.find(key)) == "val"); } -} \ No newline at end of file +} -- cgit 1.4.1-3-g733a5