diff options
Diffstat (limited to 'src/libstd/unstable/extfmt.rs')
| -rw-r--r-- | src/libstd/unstable/extfmt.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libstd/unstable/extfmt.rs b/src/libstd/unstable/extfmt.rs index 1a136bbaa37..a8cdd1fb2dc 100644 --- a/src/libstd/unstable/extfmt.rs +++ b/src/libstd/unstable/extfmt.rs @@ -77,7 +77,6 @@ debug!("hello, %s!", "world"); */ use prelude::*; -use iterator::IteratorUtil; /* * We have a 'ct' (compile-time) module that parses format strings into a @@ -616,7 +615,7 @@ pub mod rt { let headsize = match head { Some(_) => 1, _ => 0 }; let uwidth : uint = match cv.width { CountImplied => { - for head.iter().advance |&c| { + foreach &c in head.iter() { buf.push_char(c); } return buf.push_str(s); @@ -625,7 +624,7 @@ pub mod rt { }; let strlen = s.char_len() + headsize; if uwidth <= strlen { - for head.iter().advance |&c| { + foreach &c in head.iter() { buf.push_char(c); } return buf.push_str(s); @@ -633,7 +632,7 @@ pub mod rt { let mut padchar = ' '; let diff = uwidth - strlen; if have_flag(cv.flags, flag_left_justify) { - for head.iter().advance |&c| { + foreach &c in head.iter() { buf.push_char(c); } buf.push_str(s); @@ -667,7 +666,7 @@ pub mod rt { // instead. if signed && zero_padding { - for head.iter().advance |&head| { + foreach &head in head.iter() { if head == '+' || head == '-' || head == ' ' { buf.push_char(head); buf.push_str(padstr); @@ -677,7 +676,7 @@ pub mod rt { } } buf.push_str(padstr); - for head.iter().advance |&c| { + foreach &c in head.iter() { buf.push_char(c); } buf.push_str(s); |
