diff options
author | Alex Crichton <alex@alexcrichton.com> | 2014-10-11 12:07:02 -0500 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-11 12:07:02 -0500 |
commit | 8a3ba4c65cfa22a3d924293a1fb3a70bfac5e66c (patch) | |
tree | 5bfea71b401364d5c18e60b1c19e20a21e542716 | |
parent | 05c1eb420f54569336b8481c28a46b5a7c51ec99 (diff) | |
parent | 46f3872415b834a702e22f219a5db84fe0738a8f (diff) | |
download | milf-rs-8a3ba4c65cfa22a3d924293a1fb3a70bfac5e66c.tar.gz milf-rs-8a3ba4c65cfa22a3d924293a1fb3a70bfac5e66c.zip |
Merge pull request #23 from ljrmorgan/master
Fix deprecation warnings: push_char => push
-rw-r--r-- | src/parser.rs | 18 |
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, |