diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-07-11 14:50:39 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-07-12 18:16:00 -0700 |
| commit | 1a276dba52b5e717d12ab410832bdc13c28e9a67 (patch) | |
| tree | 471ec60c468939e07008f3a423a8064ffa87236b /src/libsyntax/ext | |
| parent | d5b8bbb4b20a5d88eea0b317102ed747deed802d (diff) | |
| download | rust-1a276dba52b5e717d12ab410832bdc13c28e9a67.tar.gz rust-1a276dba52b5e717d12ab410832bdc13c28e9a67.zip | |
Switch map-reduce control protocol to use pipes. This exposed a bug in the pipe compiler, which is now fixed.
Use hashmaps in MapReduce Tweak word-count difficulty
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index 296a8ba0d97..9f46e6b10ae 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -56,34 +56,11 @@ impl methods for message { // Return the type parameters actually used by this message fn get_params() -> ~[ast::ty_param] { - let mut used = ~[]; alt self { - message(_, tys, this, _, next_tys) { - let parms = this.ty_params; - for vec::append(tys, next_tys).each |ty| { - alt ty.node { - ast::ty_path(path, _) { - if path.idents.len() == 1 { - let id = path.idents[0]; - - let found = parms.find(|p| id == p.ident); - - alt found { - some(p) { - if !used.contains(p) { - vec::push(used, p); - } - } - none { } - } - } - } - _ { } - } - } + message(_, _, this, _, _) { + this.ty_params } } - used } fn gen_send(cx: ext_ctxt) -> @ast::item { |
