Skip to content

Commit

Permalink
Remove depreciated use of push_char
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryman committed Oct 21, 2014
1 parent af44dbe commit 1240fe1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl<'a, T: Iterator<char>> Parser<'a, T> {
self.state = TAG;
}
} else {
self.content.push_char(ch);
self.content.push(ch);
}
self.bump();
}
Expand All @@ -137,18 +137,18 @@ impl<'a, T: Iterator<char>> Parser<'a, T> {
// so far to the string.
self.state = TEXT;
self.not_otag();
self.content.push_char(ch);
self.content.push(ch);
}
self.bump();
}
TAG => {
if self.content.is_empty() && ch == '{' {
curly_brace_tag = true;
self.content.push_char(ch);
self.content.push(ch);
self.bump();
} else if curly_brace_tag && ch == '}' {
curly_brace_tag = false;
self.content.push_char(ch);
self.content.push(ch);
self.bump();
} else if ch == self.ctag_chars[0] {
if self.ctag_chars.len() > 1 {
Expand All @@ -160,7 +160,7 @@ impl<'a, T: Iterator<char>> Parser<'a, T> {
self.state = TEXT;
}
} else {
self.content.push_char(ch);
self.content.push(ch);
self.bump();
}
}
Expand All @@ -172,7 +172,7 @@ impl<'a, T: Iterator<char>> Parser<'a, T> {
} else {
self.state = TAG;
self.not_ctag();
self.content.push_char(ch);
self.content.push(ch);
self.bump();
}
} else {
Expand Down Expand Up @@ -494,7 +494,7 @@ impl<'a, T: Iterator<char>> Parser<'a, T> {
if !(i < self.tag_position) {
break
}
self.content.push_char(*ch);
self.content.push(*ch);
}
}

Expand All @@ -503,7 +503,7 @@ impl<'a, T: Iterator<char>> Parser<'a, T> {
if !(i < self.tag_position) {
break
}
self.content.push_char(*ch);
self.content.push(*ch);
}
}

Expand Down

0 comments on commit 1240fe1

Please sign in to comment.