Switched over a bunch of splitting funktions to non-allocating iterators
This commit is contained in:
parent
d74606ead6
commit
b9de2b5787
13 changed files with 135 additions and 98 deletions
|
@ -806,7 +806,8 @@ impl serialize::Decoder for Decoder<'self> {
|
|||
}
|
||||
|
||||
fn read_char(&self) -> char {
|
||||
let v = str::chars(self.read_owned_str());
|
||||
let mut v = ~[];
|
||||
for str::each_char(self.read_owned_str()) |c| { v.push(c) }
|
||||
if v.len() != 1 { fail!(~"string must have one character") }
|
||||
v[0]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue