]> git.lizzy.rs Git - rust.git/blobdiff - src/test/bench/shootout-fibo.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / bench / shootout-fibo.rs
index 4a4b2e8e875caf909920b0927572530ee68e1939..1f42cc6e00c5dcd580bcee0d292f7c2f2df576de 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern crate extra;
-
 use std::os;
 
 fn fib(n: int) -> int {
@@ -23,12 +21,12 @@ fn fib(n: int) -> int {
 fn main() {
     let args = os::args();
     let args = if os::getenv("RUST_BENCH").is_some() {
-        ~[~"", ~"40"]
+        vec!("".to_string(), "40".to_string())
     } else if args.len() <= 1u {
-        ~[~"", ~"30"]
+        vec!("".to_string(), "30".to_string())
     } else {
-        args
+        args.into_iter().collect()
     };
-    let n = from_str::<int>(args[1]).unwrap();
+    let n = from_str::<int>(args.get(1).as_slice()).unwrap();
     println!("{}\n", fib(n));
 }