diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-04-06 20:01:43 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-04-06 20:38:23 +0200 |
| commit | c902eafa14803ca9fcb0b59ce852bdabca826c6f (patch) | |
| tree | 2e282ea67adaca64dd813a78d94a6cd3766a5dac /src/rustdoc/markdown_pass.rs | |
| parent | 9c88e5ef5a7e9c8db4ac56d53ba48c454b8b2010 (diff) | |
| download | rust-c902eafa14803ca9fcb0b59ce852bdabca826c6f.tar.gz rust-c902eafa14803ca9fcb0b59ce852bdabca826c6f.zip | |
Convert old-style for loops to new-style
Most could use the each method, but because of the hack used to disambiguate old- and new-style loops, some had to use vec::each. (This hack will go away soon.) Issue #1619
Diffstat (limited to 'src/rustdoc/markdown_pass.rs')
| -rw-r--r-- | src/rustdoc/markdown_pass.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rustdoc/markdown_pass.rs b/src/rustdoc/markdown_pass.rs index ad72e55ba10..7057dc67e65 100644 --- a/src/rustdoc/markdown_pass.rs +++ b/src/rustdoc/markdown_pass.rs @@ -328,7 +328,7 @@ fn write_mod_contents( write_index(ctxt, option::get(doc.index)); } - for itemtag in doc.items { + for doc.items.each {|itemtag| write_item(ctxt, itemtag); } } @@ -381,7 +381,7 @@ fn write_index(ctxt: ctxt, index: doc::index) { ret; } - for entry in index.entries { + for index.entries.each {|entry| let header = header_text_(entry.kind, entry.name); let id = entry.link; if option::is_some(entry.brief) { @@ -431,7 +431,7 @@ fn write_nmod(ctxt: ctxt, doc: doc::nmoddoc) { write_index(ctxt, option::get(doc.index)); } - for fndoc in doc.fns { + for doc.fns.each {|fndoc| write_item_header(ctxt, doc::fntag(fndoc)); write_fn(ctxt, fndoc); } |
