test: "import" -> "use"
This commit is contained in:
parent
47dac47e96
commit
f686896f60
270 changed files with 406 additions and 559 deletions
|
|
@ -5,11 +5,10 @@
|
|||
*/
|
||||
|
||||
use std;
|
||||
import rand;
|
||||
import std::map;
|
||||
import managed::Managed;
|
||||
import send_map::linear::*;
|
||||
import io::WriterUtil;
|
||||
use std::map;
|
||||
use managed::Managed;
|
||||
use send_map::linear::*;
|
||||
use io::WriterUtil;
|
||||
|
||||
struct Results {
|
||||
sequential_ints: float;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
use std;
|
||||
|
||||
import std::time::precise_time_s;
|
||||
import std::map;
|
||||
import std::map::{map, hashmap};
|
||||
use std::time::precise_time_s;
|
||||
use std::map;
|
||||
use std::map::{map, hashmap};
|
||||
|
||||
import io::{Reader, ReaderUtil};
|
||||
use io::{Reader, ReaderUtil};
|
||||
|
||||
fn main(argv: ~[~str]) {
|
||||
#macro[
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// A raw test of vector appending performance.
|
||||
|
||||
use std;
|
||||
import dvec::DVec;
|
||||
import io::WriterUtil;
|
||||
use dvec::DVec;
|
||||
use io::WriterUtil;
|
||||
|
||||
fn collect_raw(num: uint) -> ~[uint] {
|
||||
let mut result = ~[];
|
||||
|
|
|
|||
|
|
@ -5,17 +5,17 @@ An implementation of the Graph500 Breadth First Search problem in Rust.
|
|||
*/
|
||||
|
||||
use std;
|
||||
import std::arc;
|
||||
import std::time;
|
||||
import std::map;
|
||||
import std::map::map;
|
||||
import std::map::hashmap;
|
||||
import std::deque;
|
||||
import std::deque::Deque;
|
||||
import std::par;
|
||||
import io::WriterUtil;
|
||||
import comm::*;
|
||||
import int::abs;
|
||||
use std::arc;
|
||||
use std::time;
|
||||
use std::map;
|
||||
use std::map::map;
|
||||
use std::map::hashmap;
|
||||
use std::deque;
|
||||
use std::deque::Deque;
|
||||
use std::par;
|
||||
use io::WriterUtil;
|
||||
use comm::*;
|
||||
use int::abs;
|
||||
|
||||
type node_id = i64;
|
||||
type graph = ~[~[node_id]];
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
// xfail-pretty
|
||||
|
||||
use std;
|
||||
import io::Writer;
|
||||
import io::WriterUtil;
|
||||
use io::Writer;
|
||||
use io::WriterUtil;
|
||||
|
||||
import pipes::{Port, Chan, SharedChan};
|
||||
use pipes::{Port, Chan, SharedChan};
|
||||
|
||||
macro_rules! move_out (
|
||||
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
// xfail-pretty
|
||||
|
||||
use std;
|
||||
import io::Writer;
|
||||
import io::WriterUtil;
|
||||
use io::Writer;
|
||||
use io::WriterUtil;
|
||||
|
||||
import pipes::{Port, PortSet, Chan};
|
||||
use pipes::{Port, PortSet, Chan};
|
||||
|
||||
macro_rules! move_out (
|
||||
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
// xfail-pretty
|
||||
|
||||
import future::future;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
import std::arc;
|
||||
use std::time;
|
||||
use std::arc;
|
||||
|
||||
// A poor man's pipe.
|
||||
type pipe = arc::MutexARC<~[uint]>;
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@
|
|||
|
||||
// xfail-pretty
|
||||
|
||||
import future::future;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
use std::time;
|
||||
|
||||
import pipes::recv;
|
||||
use pipes::recv;
|
||||
|
||||
proto! ring (
|
||||
num:send {
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
// xfail-pretty
|
||||
|
||||
import future::future;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
import std::arc;
|
||||
use std::time;
|
||||
use std::arc;
|
||||
|
||||
// A poor man's pipe.
|
||||
type pipe = arc::RWARC<~[uint]>;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
// that things will look really good once we get that lock out of the
|
||||
// message path.
|
||||
|
||||
import comm::*;
|
||||
import future::future;
|
||||
use comm::*;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
use std::time;
|
||||
|
||||
fn thread_ring(i: uint,
|
||||
count: uint,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
// I *think* it's the same, more or less.
|
||||
|
||||
use std;
|
||||
import io::Writer;
|
||||
import io::WriterUtil;
|
||||
use io::Writer;
|
||||
use io::WriterUtil;
|
||||
|
||||
enum request {
|
||||
get_count,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
use std;
|
||||
|
||||
import pipes::{spawn_service, recv};
|
||||
import std::time::precise_time_s;
|
||||
use pipes::{spawn_service, recv};
|
||||
use std::time::precise_time_s;
|
||||
|
||||
proto! pingpong (
|
||||
ping: send {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std;
|
||||
import std::arena;
|
||||
import methods = std::arena::Arena;
|
||||
use std::arena;
|
||||
use methods = std::arena::Arena;
|
||||
|
||||
enum tree/& { nil, node(&tree, &tree, int), }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// chameneos
|
||||
|
||||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::sort;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use std::sort;
|
||||
|
||||
fn print_complements() {
|
||||
let all = ~[Blue, Red, Yellow];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
// Based on Isaac Gouy's fannkuchredux.csharp
|
||||
use std;
|
||||
import int;
|
||||
import vec;
|
||||
|
||||
fn fannkuch(n: int) -> int {
|
||||
fn perm1init(i: uint) -> int { return i as int; }
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@
|
|||
* http://shootout.alioth.debian.org/
|
||||
*/
|
||||
use std;
|
||||
import vec;
|
||||
import uint;
|
||||
import int;
|
||||
import str;
|
||||
import io::WriterUtil;
|
||||
use io::WriterUtil;
|
||||
|
||||
fn LINE_LENGTH() -> uint { return 60u; }
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
// multi tasking k-nucleotide
|
||||
|
||||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::sort;
|
||||
import io::ReaderUtil;
|
||||
import pipes::{stream, Port, Chan};
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use std::sort;
|
||||
use io::ReaderUtil;
|
||||
use pipes::{stream, Port, Chan};
|
||||
|
||||
// given a map, print a sorted version of it
|
||||
fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
// multi tasking k-nucleotide
|
||||
|
||||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::sort;
|
||||
import io::ReaderUtil;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use std::sort;
|
||||
use io::ReaderUtil;
|
||||
|
||||
// given a map, print a sorted version of it
|
||||
fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
// writes pbm image to output path
|
||||
|
||||
use std;
|
||||
import io::WriterUtil;
|
||||
import std::map::hashmap;
|
||||
use io::WriterUtil;
|
||||
use std::map::hashmap;
|
||||
|
||||
struct cmplx {
|
||||
re: f64;
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@
|
|||
|
||||
use std;
|
||||
|
||||
import std::{time, getopts};
|
||||
import io::WriterUtil;
|
||||
import int::range;
|
||||
import pipes::Port;
|
||||
import pipes::Chan;
|
||||
import pipes::send;
|
||||
import pipes::recv;
|
||||
use std::{time, getopts};
|
||||
use io::WriterUtil;
|
||||
use int::range;
|
||||
use pipes::Port;
|
||||
use pipes::Chan;
|
||||
use pipes::send;
|
||||
use pipes::recv;
|
||||
|
||||
import core::result;
|
||||
import result::{Ok, Err};
|
||||
use core::result;
|
||||
use result::{Ok, Err};
|
||||
|
||||
fn fib(n: int) -> int {
|
||||
fn pfib(c: Chan<int>, n: int) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// Microbenchmark for the smallintmap library
|
||||
|
||||
use std;
|
||||
import std::smallintmap;
|
||||
import std::smallintmap::SmallIntMap;
|
||||
import io::WriterUtil;
|
||||
use std::smallintmap;
|
||||
use std::smallintmap::SmallIntMap;
|
||||
use io::WriterUtil;
|
||||
|
||||
fn append_sequential(min: uint, max: uint, map: SmallIntMap<uint>) {
|
||||
for uint::range(min, max) |i| {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std;
|
||||
|
||||
import std::bitv;
|
||||
import io::{ReaderUtil, WriterUtil};
|
||||
use std::bitv;
|
||||
use io::{ReaderUtil, WriterUtil};
|
||||
|
||||
// Computes a single solution to a given 9x9 sudoku
|
||||
//
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
use std;
|
||||
|
||||
import std::list::{List, Cons, Nil};
|
||||
import std::time::precise_time_s;
|
||||
use std::list::{List, Cons, Nil};
|
||||
use std::time::precise_time_s;
|
||||
|
||||
fn main() {
|
||||
let (repeat, depth) = if os::getenv(~"RUST_BENCH").is_some() {
|
||||
|
|
|
|||
|
|
@ -12,25 +12,19 @@
|
|||
|
||||
use std;
|
||||
|
||||
import option = option;
|
||||
import option::Some;
|
||||
import option::None;
|
||||
import str;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import vec;
|
||||
import io;
|
||||
import io::WriterUtil;
|
||||
use option = option;
|
||||
use option::Some;
|
||||
use option::None;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use io::WriterUtil;
|
||||
|
||||
import std::time;
|
||||
import u64;
|
||||
use std::time;
|
||||
|
||||
import task;
|
||||
import comm;
|
||||
import comm::Chan;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
import comm::send;
|
||||
use comm::Chan;
|
||||
use comm::Port;
|
||||
use comm::recv;
|
||||
use comm::send;
|
||||
|
||||
macro_rules! move_out (
|
||||
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue