aboutsummaryrefslogtreecommitdiff
path: root/src/parser.rs
diff options
context:
space:
mode:
authorLouis Morgan <ljrmorgan@gmail.com>2014-10-11 18:04:44 +0100
committerLouis Morgan <ljrmorgan@gmail.com>2014-10-11 18:04:44 +0100
commit46f3872415b834a702e22f219a5db84fe0738a8f (patch)
tree5bfea71b401364d5c18e60b1c19e20a21e542716 /src/parser.rs
parent05c1eb420f54569336b8481c28a46b5a7c51ec99 (diff)
downloadmilf-rs-46f3872415b834a702e22f219a5db84fe0738a8f.tar.gz
milf-rs-46f3872415b834a702e22f219a5db84fe0738a8f.zip
Fix deprecation warnings: push_char => push
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/parser.rs b/src/parser.rs
index cbf8b6d..3bd7a1c 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -158,7 +158,7 @@ impl<'a> Parser<'a> {
});
continue
}
- section.push_char(ch);
+ section.push(ch);
}
if section.len() == 0 {
@@ -212,7 +212,7 @@ impl<'a> Parser<'a> {
across lines"),
})
}
- c => key.push_char(c),
+ c => key.push(c),
}
}
if !found_eq {
@@ -288,14 +288,14 @@ impl<'a> Parser<'a> {
}
Some((pos, '\\')) => {
match escape(self, pos, multiline) {
- Some(c) => ret.push_char(c),
+ Some(c) => ret.push(c),
None => {}
}
}
- Some((_, '\n')) if multiline => ret.push_char('\n'),
+ Some((_, '\n')) if multiline => ret.push('\n'),
Some((pos, ch)) if ch < '\u001f' => {
let mut escaped = String::new();
- ch.escape_default(|c| escaped.push_char(c));
+ ch.escape_default(|c| escaped.push(c));
self.errors.push(ParserError {
lo: pos,
hi: pos + 1,
@@ -303,7 +303,7 @@ impl<'a> Parser<'a> {
escaped)
});
}
- Some((_, ch)) => ret.push_char(ch),
+ Some((_, ch)) => ret.push(ch),
None => {
self.errors.push(ParserError {
lo: start,
@@ -379,7 +379,7 @@ impl<'a> Parser<'a> {
}
Some((pos, ch)) => {
let mut escaped = String::new();
- ch.escape_default(|c| escaped.push_char(c));
+ ch.escape_default(|c| escaped.push(c));
let next_pos = me.next_pos();
me.errors.push(ParserError {
lo: pos,
@@ -422,7 +422,7 @@ impl<'a> Parser<'a> {
}
break
}
- Some((_, ch)) => ret.push_char(ch),
+ Some((_, ch)) => ret.push(ch),
None => {
self.errors.push(ParserError {
lo: start,
@@ -500,7 +500,7 @@ impl<'a> Parser<'a> {
let mut date = self.input.slice(start, end_so_far).to_string();
for _ in range(0u, 15u) {
match self.cur.next() {
- Some((_, ch)) => date.push_char(ch),
+ Some((_, ch)) => date.push(ch),
None => {
self.errors.push(ParserError {
lo: start,