]> git.lizzy.rs Git - rust.git/commitdiff
remove some workarounds for old bugs
authorTim Chevalier <chevalier@alum.wellesley.edu>
Tue, 12 Jul 2011 00:28:35 +0000 (17:28 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Tue, 12 Jul 2011 00:32:00 +0000 (17:32 -0700)
src/lib/getopts.rs

index e34e13253d432d22db66dcb6cd08649c37022e95..faf9d131e73e9845b190727fc731dadaf0bc67d0 100644 (file)
@@ -120,8 +120,7 @@ fn fail_str(fail_ f) -> str {
 
 fn getopts(vec[str] args, vec[opt] opts) -> result {
     auto n_opts = vec::len[opt](opts);
-    fn empty_(uint x) -> vec[optval] { ret vec::empty[optval](); }
-    auto f = empty_;
+    fn f(uint x) -> vec[optval] { ret vec::empty(); }
     auto vals = vec::init_fn_mut[vec[optval]](f, n_opts);
     let vec[str] free = [];
     auto l = vec::len[str](args);