diff options
author | Valerii Hiora <valerii.hiora@gmail.com> | 2015-01-07 18:58:50 +0200 |
---|---|---|
committer | Valerii Hiora <valerii.hiora@gmail.com> | 2015-01-08 19:50:03 +0200 |
commit | 1dfb94afba78d8f796e59756d4c5b45a4f5ce5df (patch) | |
tree | b411c536a294f695c5c4e8eff3cd87bdbf19034e /src/parser.rs | |
parent | 6195861f53c6731bedce5900a624986b8d4247c8 (diff) | |
download | milf-rs-1dfb94afba78d8f796e59756d4c5b45a4f5ce5df.tar.gz milf-rs-1dfb94afba78d8f796e59756d4c5b45a4f5ce5df.zip |
Update to master
- features
- macro reform
- String/Show split in formatter
- staging
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser.rs b/src/parser.rs index f6a1ac3..6df4699 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -52,9 +52,9 @@ impl<'a> Parser<'a> { /// /// let mut parser = toml::Parser::new(toml); /// match parser.parse() { - /// Some(value) => println!("found toml: {}", value), + /// Some(value) => println!("found toml: {:?}", value), /// None => { - /// println!("parse errors: {}", parser.errors); + /// println!("parse errors: {:?}", parser.errors); /// } /// } /// ``` @@ -651,7 +651,7 @@ impl<'a> Parser<'a> { } Array(ref mut array) => { match array.as_mut_slice().last_mut() { - Some(&Table(ref mut table)) => cur = table, + Some(&mut Table(ref mut table)) => cur = table, _ => { self.errors.push(ParserError { lo: key_lo, @@ -699,7 +699,7 @@ impl<'a> Parser<'a> { added = true; } match into.get_mut(&key) { - Some(&Table(ref mut table)) => { + Some(&mut Table(ref mut table)) => { let any_tables = table.values().any(|v| v.as_table().is_some()); if !any_tables && !added { self.errors.push(ParserError { |