diff options
| author | bors <bors@rust-lang.org> | 2013-08-01 22:10:45 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-01 22:10:45 -0700 |
| commit | bbcce8d95c582d3f918fe4e978d6a715efd991e9 (patch) | |
| tree | 6c0a714130897160fc6ef8a3d17671aed2bc8b90 /src/libextra/terminfo/parser | |
| parent | ecefeb03ccecdcb306e5cc3c76b04670073a82fa (diff) | |
| parent | 234acad404535868ecd7f5b48c3e120c4ea559c9 (diff) | |
auto merge of #8216 : thestinger/rust/range, r=huonw
Diffstat (limited to 'src/libextra/terminfo/parser')
| -rw-r--r-- | src/libextra/terminfo/parser/compiled.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libextra/terminfo/parser/compiled.rs b/src/libextra/terminfo/parser/compiled.rs index a6ed88fa559..869f7d9df2b 100644 --- a/src/libextra/terminfo/parser/compiled.rs +++ b/src/libextra/terminfo/parser/compiled.rs @@ -13,7 +13,7 @@ /// ncurses-compatible compiled terminfo format parsing (term(5)) -use std::{vec, int, str}; +use std::{vec, str}; use std::io::Reader; use std::hashmap::HashMap; use super::super::TermInfo; @@ -222,7 +222,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> { let mut bools_map = HashMap::new(); if bools_bytes != 0 { - for int::range(0, bools_bytes) |i| { + foreach i in range(0, bools_bytes) { let b = file.read_byte(); if b < 0 { error!("EOF reading bools after %? entries", i); @@ -243,7 +243,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> { let mut numbers_map = HashMap::new(); if numbers_count != 0 { - for int::range(0, numbers_count) |i| { + foreach i in range(0, numbers_count) { let n = file.read_le_u16(); if n != 0xFFFF { debug!("%s#%?", nnames[i], n); @@ -258,7 +258,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> { if string_offsets_count != 0 { let mut string_offsets = vec::with_capacity(10); - for int::range(0, string_offsets_count) |_i| { + foreach _ in range(0, string_offsets_count) { string_offsets.push(file.read_le_u16()); } |
