diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-07-02 01:26:44 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-07-04 00:46:49 +1000 |
| commit | eee677564216a64f48ebaffa860e4062f2b2d264 (patch) | |
| tree | 57cbad17c6c510a8a164dc88b757a1ba908454b6 /src/libsyntax/ext | |
| parent | 55f155521d2f604794d2ab1de2a8d439440af4a8 (diff) | |
| download | rust-eee677564216a64f48ebaffa860e4062f2b2d264.tar.gz rust-eee677564216a64f48ebaffa860e4062f2b2d264.zip | |
Implement consuming iterators for ~[], remove vec::{consume, consume_reverse, map_consume}.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/fmt.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs index 76073199f64..333570b6c9d 100644 --- a/src/libsyntax/ext/fmt.rs +++ b/src/libsyntax/ext/fmt.rs @@ -22,7 +22,6 @@ use ext::build::AstBuilder; use std::option; use std::unstable::extfmt::ct::*; -use std::vec; use parse::token::{str_to_ident}; pub fn expand_syntax_ext(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree]) @@ -268,7 +267,7 @@ fn pieces_to_expr(cx: @ExtCtxt, sp: span, corresponding function in std::unstable::extfmt. Each function takes a buffer to insert data into along with the data being formatted. */ let npieces = pieces.len(); - do vec::consume(pieces) |i, pc| { + for pieces.consume_iter().enumerate().advance |(i, pc)| { match pc { /* Raw strings get appended via str::push_str */ PieceString(s) => { |
