diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-09 00:38:58 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-09 02:22:23 +1000 |
| commit | 00f591680983cc19a6d9f24d8f8c0026ccf20398 (patch) | |
| tree | fd8fb9c6dbaa2627ada292bbd918070f1559d1ae /src/libsyntax/ext | |
| parent | 4b806b4d06a6b82771657f9b79728d3fba84ebed (diff) | |
std: replace the str::each* fns/methods with byte iterators
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/bytes.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/ext/bytes.rs b/src/libsyntax/ext/bytes.rs index a046395b6f5..51fbaee7a33 100644 --- a/src/libsyntax/ext/bytes.rs +++ b/src/libsyntax/ext/bytes.rs @@ -10,6 +10,7 @@ /* The compiler code necessary to support the bytes! extension. */ +use core::iterator::IteratorUtil; use ast; use codemap::span; use ext::base::*; @@ -27,7 +28,7 @@ pub fn expand_syntax_ext(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree]) -> bas ast::expr_lit(lit) => match lit.node { // string literal, push each byte to vector expression ast::lit_str(s) => { - for s.each |byte| { + for s.bytes_iter().advance |byte| { bytes.push(cx.expr_u8(sp, byte)); } } |
