test: "tag" -> "enum" in bench
This commit is contained in:
parent
64a0695fec
commit
1461cfe416
@ -8,7 +8,7 @@ use std;
|
||||
import int;
|
||||
import str;
|
||||
|
||||
tag bottle { none; dual; single; multiple(int); }
|
||||
enum bottle { none; dual; single; multiple(int); }
|
||||
|
||||
fn show(b: bottle) {
|
||||
alt b {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std;
|
||||
import int;
|
||||
|
||||
tag tree { nil; node(~tree, ~tree, int); }
|
||||
enum tree { nil; node(~tree, ~tree, int); }
|
||||
|
||||
fn item_check(t: ~tree) -> int {
|
||||
alt *t {
|
||||
|
@ -25,7 +25,7 @@ export grid_t, read_grid, solve_grid, write_grid;
|
||||
type grid = [[mutable u8]];
|
||||
|
||||
// exported type of sudoku grids
|
||||
tag grid_t { grid_ctor(grid); }
|
||||
enum grid_t { grid_ctor(grid); }
|
||||
|
||||
// read a sudoku problem from file f
|
||||
fn read_grid(f: io::reader) -> grid_t {
|
||||
|
@ -65,12 +65,12 @@ mod map_reduce {
|
||||
|
||||
type reducer<K: send, V: send> = fn(K, getter<V>);
|
||||
|
||||
tag ctrl_proto<K: send, V: send> {
|
||||
enum ctrl_proto<K: send, V: send> {
|
||||
find_reducer(K, chan<chan<reduce_proto<V>>>);
|
||||
mapper_done;
|
||||
}
|
||||
|
||||
tag reduce_proto<V: send> { emit_val(V); done; ref; release; }
|
||||
enum reduce_proto<V: send> { emit_val(V); done; ref; release; }
|
||||
|
||||
fn start_mappers<K1: send, K2: send,
|
||||
V: send>(map: mapper<K1, K2, V>,
|
||||
|
@ -51,12 +51,12 @@ mod map_reduce {
|
||||
|
||||
type reducer = fn@(str, getter);
|
||||
|
||||
tag ctrl_proto {
|
||||
enum ctrl_proto {
|
||||
find_reducer(str, chan<chan<reduce_proto>>);
|
||||
mapper_done;
|
||||
}
|
||||
|
||||
tag reduce_proto { emit_val(int); done; ref; release; }
|
||||
enum reduce_proto { emit_val(int); done; ref; release; }
|
||||
|
||||
fn start_mappers(ctrl: chan<ctrl_proto>, -inputs: [str]) ->
|
||||
[joinable_task] {
|
||||
|
Loading…
Reference in New Issue
Block a user