Bug 1441204 - Upgrade rust-ini from 0.10.2 to 0.10.3. r?maja_zf draft
authorAndreas Tolfsen <ato@sny.no>
Thu, 14 Jun 2018 13:05:30 -0700
changeset 807822 21f752b26b8e67228a8be0219c9bc751336e79d7
parent 807821 820b6dc1bb3790b22633e6993ca5bdda4c0b78ac
child 807823 94c51b244504284b1bfd1fd55fc374f925e7be9f
push id113223
push userbmo:ato@sny.no
push dateFri, 15 Jun 2018 20:32:16 +0000
reviewersmaja_zf
bugs1441204
milestone62.0a1
Bug 1441204 - Upgrade rust-ini from 0.10.2 to 0.10.3. r?maja_zf MozReview-Commit-ID: DZp1wg7uVLN
Cargo.lock
testing/mozbase/rust/mozversion/Cargo.toml
third_party/rust/rust-ini/.cargo-checksum.json
third_party/rust/rust-ini/Cargo.toml
third_party/rust/rust-ini/src/ini.rs
third_party/rust/rust-ini/src/lib.rs
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1298,17 +1298,17 @@ dependencies = [
  "xpcom 0.1.0",
 ]
 
 [[package]]
 name = "mozversion"
 version = "0.1.3"
 dependencies = [
  "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "rust-ini 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rust-ini 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mp4parse"
 version = "0.10.1"
 dependencies = [
  "bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1746,21 +1746,18 @@ dependencies = [
 
 [[package]]
 name = "runloop"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "rust-ini"
-version = "0.10.2"
+version = "0.10.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
-]
 
 [[package]]
 name = "rustc-serialize"
 version = "0.3.24"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "safemem"
@@ -2678,17 +2675,17 @@ dependencies = [
 "checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8"
 "checksum redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "ab105df655884ede59d45b7070c8a65002d921461ee813a024558ca16030eea0"
 "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
 "checksum regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75ecf88252dce580404a22444fc7d626c01815debba56a7f4f536772a5ff19d3"
 "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
 "checksum regex-syntax 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1ac0f60d675cc6cf13a20ec076568254472551051ad5dd050364d70671bf6b"
 "checksum ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "da06feaa07f69125ab9ddc769b11de29090122170b402547f64b86fe16ebc399"
 "checksum runloop 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d79b4b604167921892e84afbbaad9d5ad74e091bf6c511d9dbfb0593f09fabd"
-"checksum rust-ini 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22dab655e8122ccb15db25a56852ce62506f1486cdefd37e86371bf34ea8f601"
+"checksum rust-ini 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8a654c5bda722c699be6b0fe4c0d90de218928da5b724c3e467fc48865c37263"
 "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
 "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
 "checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
 "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d"
 "checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918"
 "checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
 "checksum serde 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)" = "34e9df8efbe7a2c12ceec1fc8744d56ae3374d8ae325f4a0028949d16433d554"
--- a/testing/mozbase/rust/mozversion/Cargo.toml
+++ b/testing/mozbase/rust/mozversion/Cargo.toml
@@ -4,10 +4,10 @@ version = "0.1.3"
 authors = ["James Graham <james@hoppipolla.co.uk>"]
 description = "Utility for accessing Firefox version metadata"
 keywords = ["mozilla", "firefox"]
 repository = "https://hg.mozilla.org/mozilla-central/file/tip/testing/mozbase/rust/mozversion"
 license = "MPL-2.0"
 
 [dependencies]
 regex = "0.2"
-rust-ini = "0.10.2"
+rust-ini = "0.10"
 semver = "0.6"
--- a/third_party/rust/rust-ini/.cargo-checksum.json
+++ b/third_party/rust/rust-ini/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"ea2f6250c91c6c4e7f361319c8c65773925f8e3f2b1e4ee3658bca6f8a64f956","Cargo.toml":"1036fdaf2efa14c461f589d1dab673902d40751ed7f913f05c1e03441748f331","README.rst":"00f66737b5625a3f9a8668bf8adf371369a616c1d97c14ae5693655a4de930d1","examples/test.rs":"7ab1303e0a2c8205459f80f482279ee946fcc65e7d7a1d2d4434c0340782aa29","src/ini.rs":"32b4bbebe2039e4ff651c55064255d7d02880861ad49580440d854968514da7f","src/lib.rs":"80fa5b6db977af8bb248c18b16791517e3b63bd260cd590ce3229903fe9982a8"},"package":"22dab655e8122ccb15db25a56852ce62506f1486cdefd37e86371bf34ea8f601"}
\ No newline at end of file
+{"files":{".travis.yml":"ea2f6250c91c6c4e7f361319c8c65773925f8e3f2b1e4ee3658bca6f8a64f956","Cargo.toml":"be54e73b2ca201054f9ce18fe2a5808962c1ea9af3272e6695d687da5245a6e3","README.rst":"00f66737b5625a3f9a8668bf8adf371369a616c1d97c14ae5693655a4de930d1","examples/test.rs":"7ab1303e0a2c8205459f80f482279ee946fcc65e7d7a1d2d4434c0340782aa29","src/ini.rs":"9ebd4b176ae787401fbd48e729b79c4c06d511f8f2c7ea63fb7f7842d746ec11","src/lib.rs":"aed9682c3814b4468d9f94b34e19ccd5a3bec0e61a14be276b3026f9046c8bbe"},"package":"8a654c5bda722c699be6b0fe4c0d90de218928da5b724c3e467fc48865c37263"}
\ No newline at end of file
--- a/third_party/rust/rust-ini/Cargo.toml
+++ b/third_party/rust/rust-ini/Cargo.toml
@@ -7,21 +7,19 @@
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "rust-ini"
-version = "0.10.2"
+version = "0.10.3"
 authors = ["Y. T. Chung <zonyitoo@gmail.com>"]
 description = "An Ini configuration file parsing library in Rust"
 documentation = "https://docs.rs/rust-ini/"
 keywords = ["ini", "configuration", "conf", "cfg"]
 license = "MIT"
 repository = "https://github.com/zonyitoo/rust-ini"
 
 [lib]
 name = "ini"
 test = true
-[dependencies.log]
-version = "^0"
--- a/third_party/rust/rust-ini/src/ini.rs
+++ b/third_party/rust/rust-ini/src/ini.rs
@@ -17,22 +17,22 @@
 // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 //! Ini
 
 use std::collections::HashMap;
-use std::collections::hash_map::{Iter, IterMut, IntoIter, Keys};
+use std::collections::hash_map::{IntoIter, Iter, IterMut, Keys};
 use std::collections::hash_map::Entry;
-use std::fs::{OpenOptions, File};
+use std::fs::{File, OpenOptions};
 use std::ops::{Index, IndexMut};
 use std::char;
-use std::io::{self, Write, Read};
+use std::io::{self, Read, Write};
 use std::fmt::{self, Display};
 use std::path::Path;
 use std::str::Chars;
 use std::borrow::Borrow;
 use std::hash::Hash;
 use std::cmp::Eq;
 use std::error;
 
@@ -77,19 +77,17 @@ impl EscapePolicy {
             _ => false,
         }
     }
 
     /// Given a character this returns true if it should be escaped as
     /// per this policy or false if not.
     pub fn should_escape(&self, c: char) -> bool {
         match c {
-            '\\' |
-            '\x00'...'\x1f' |
-            '\x7f'...'\u{00ff}' => self.escape_basics(),
+            '\\' | '\x00'...'\x1f' | '\x7f'...'\u{00ff}' => self.escape_basics(),
             ';' | '#' | '=' | ':' => self.escape_reserved(),
             '\u{0080}'...'\u{FFFF}' => self.escape_unicode(),
             _ => false,
         }
     }
 }
 
 // Escape non-INI characters
@@ -116,19 +114,19 @@ fn escape_str(s: &str, policy: EscapePol
         if !policy.should_escape(c) {
             escaped.push(c);
             continue;
         }
 
         match c {
             '\\' => escaped.push_str("\\\\"),
             '\0' => escaped.push_str("\\0"),
-            '\x01'...'\x06' |
-            '\x0e'...'\x1f' |
-            '\x7f'...'\u{00ff}' => escaped.push_str(&format!("\\x{:04x}", c as isize)[..]),
+            '\x01'...'\x06' | '\x0e'...'\x1f' | '\x7f'...'\u{00ff}' => {
+                escaped.push_str(&format!("\\x{:04x}", c as isize)[..])
+            }
             '\x07' => escaped.push_str("\\a"),
             '\x08' => escaped.push_str("\\b"),
             '\x0c' => escaped.push_str("\\f"),
             '\x0b' => escaped.push_str("\\v"),
             '\n' => escaped.push_str("\\n"),
             '\t' => escaped.push_str("\\t"),
             '\r' => escaped.push_str("\\r"),
             '\u{0080}'...'\u{FFFF}' => escaped.push_str(&format!("\\x{:04x}", c as isize)[..]),
@@ -152,44 +150,47 @@ impl<'a> SectionSetter<'a> {
         SectionSetter {
             ini: ini,
             section_name: section_name,
         }
     }
 
     /// Set key-value pair in this section
     pub fn set<K, V>(&'a mut self, key: K, value: V) -> &'a mut SectionSetter<'a>
-        where K: Into<String>,
-              V: Into<String>
+    where
+        K: Into<String>,
+        V: Into<String>,
     {
         {
             let prop = match self.ini.sections.entry(self.section_name.clone()) {
                 Entry::Vacant(entry) => entry.insert(HashMap::new()),
                 Entry::Occupied(entry) => entry.into_mut(),
             };
             prop.insert(key.into(), value.into());
         }
         self
     }
 
     /// Delete the entry in this section with `key`
     pub fn delete<K>(&'a mut self, key: &K) -> &'a mut SectionSetter<'a>
-        where String: Borrow<K>,
-              K: Hash + Eq + ?Sized
+    where
+        String: Borrow<K>,
+        K: Hash + Eq + ?Sized,
     {
         if let Some(prop) = self.ini.sections.get_mut(&self.section_name) {
             prop.remove(key);
         }
         self
     }
 
     /// Get the entry in this section with `key`
     pub fn get<K>(&'a mut self, key: &K) -> Option<&'a str>
-        where String: Borrow<K>,
-              K: Hash + Eq + ?Sized
+    where
+        String: Borrow<K>,
+        K: Hash + Eq + ?Sized,
     {
         self.ini
             .sections
             .get(&self.section_name)
             .and_then(|prop| prop.get(key).map(|s| &s[..]))
     }
 }
 
@@ -200,46 +201,53 @@ pub type Properties = HashMap<String, St
 #[derive(Clone)]
 pub struct Ini {
     sections: HashMap<Option<String>, Properties>,
 }
 
 impl Ini {
     /// Create an instance
     pub fn new() -> Ini {
-        Ini { sections: HashMap::new() }
+        Ini {
+            sections: HashMap::new(),
+        }
     }
 
     /// Set with a specified section, `None` is for the general section
     pub fn with_section<'b, S>(&'b mut self, section: Option<S>) -> SectionSetter<'b>
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         SectionSetter::new(self, section.map(|s| s.into()))
     }
 
     /// Get the immmutable general section
     pub fn general_section(&self) -> &Properties {
-        self.section(None::<String>).expect("There is no general section in this Ini")
+        self.section(None::<String>)
+            .expect("There is no general section in this Ini")
     }
 
     /// Get the mutable general section
     pub fn general_section_mut(&mut self) -> &mut Properties {
-        self.section_mut(None::<String>).expect("There is no general section in this Ini")
+        self.section_mut(None::<String>)
+            .expect("There is no general section in this Ini")
     }
 
     /// Get a immutable section
     pub fn section<'a, S>(&'a self, name: Option<S>) -> Option<&'a Properties>
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         self.sections.get(&name.map(|s| s.into()))
     }
 
     /// Get a mutable section
     pub fn section_mut<'a, S>(&'a mut self, name: Option<S>) -> Option<&'a mut Properties>
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         self.sections.get_mut(&name.map(|s| s.into()))
     }
 
     /// Get the entry
     pub fn entry<'a>(&'a mut self, name: Option<String>) -> Entry<Option<String>, Properties> {
         self.sections.entry(name.map(|s| s.into()))
     }
@@ -251,88 +259,90 @@ impl Ini {
 
     /// Iterate with sections
     pub fn sections<'a>(&'a self) -> Keys<'a, Option<String>, Properties> {
         self.sections.keys()
     }
 
     /// Set key-value to a section
     pub fn set_to<S>(&mut self, section: Option<S>, key: String, value: String)
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         self.with_section(section).set(key, value);
     }
 
     /// Get the value from a section with key
     ///
     /// Example:
     ///
     /// ```
     /// use ini::Ini;
     /// let input = "[sec]\nabc = def\n";
     /// let ini = Ini::load_from_str(input).unwrap();
     /// assert_eq!(ini.get_from(Some("sec"), "abc"), Some("def"));
     /// ```
     pub fn get_from<'a, S>(&'a self, section: Option<S>, key: &str) -> Option<&'a str>
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         match self.sections.get(&section.map(|s| s.into())) {
             None => None,
-            Some(ref prop) => {
-                match prop.get(key) {
-                    Some(p) => Some(&p[..]),
-                    None => None,
-                }
-            }
+            Some(ref prop) => match prop.get(key) {
+                Some(p) => Some(&p[..]),
+                None => None,
+            },
         }
     }
 
     /// Get the value from a section with key, return the default value if it does not exist
     ///
     /// Example:
     ///
     /// ```
     /// use ini::Ini;
     /// let input = "[sec]\n";
     /// let ini = Ini::load_from_str(input).unwrap();
     /// assert_eq!(ini.get_from_or(Some("sec"), "key", "default"), "default");
     /// ```
     pub fn get_from_or<'a, S>(&'a self, section: Option<S>, key: &str, default: &'a str) -> &'a str
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         match self.sections.get(&section.map(|s| s.into())) {
             None => default,
-            Some(ref prop) => {
-                match prop.get(key) {
-                    Some(p) => &p[..],
-                    None => default,
-                }
-            }
+            Some(ref prop) => match prop.get(key) {
+                Some(p) => &p[..],
+                None => default,
+            },
         }
     }
 
     /// Get the mutable from a section with key
     pub fn get_from_mut<'a, S>(&'a mut self, section: Option<S>, key: &str) -> Option<&'a str>
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         match self.sections.get_mut(&section.map(|s| s.into())) {
             None => None,
             Some(prop) => prop.get_mut(key).map(|s| &s[..]),
         }
     }
 
     /// Delete a section, return the properties if it exists
     pub fn delete<S>(&mut self, section: Option<S>) -> Option<Properties>
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         self.sections.remove(&section.map(|s| s.into()))
     }
 
     pub fn delete_from<S>(&mut self, section: Option<S>, key: &str) -> Option<String>
-        where S: Into<String>
+    where
+        S: Into<String>,
     {
         match self.section_mut(section) {
             None => return None,
             Some(prop) => prop.remove(key),
         }
     }
 }
 
@@ -378,38 +388,42 @@ impl<'q> IndexMut<&'q str> for Ini {
 
 impl Ini {
     /// Write to a file
     pub fn write_to_file<P: AsRef<Path>>(&self, filename: P) -> io::Result<()> {
         self.write_to_file_policy(filename, EscapePolicy::Basics)
     }
 
     /// Write to a file
-    pub fn write_to_file_policy<P: AsRef<Path>>(&self,
-                                                filename: P,
-                                                policy: EscapePolicy)
-                                                -> io::Result<()> {
-        let mut file = try!(OpenOptions::new()
-            .write(true)
-            .truncate(true)
-            .create(true)
-            .open(filename.as_ref()));
+    pub fn write_to_file_policy<P: AsRef<Path>>(
+        &self,
+        filename: P,
+        policy: EscapePolicy,
+    ) -> io::Result<()> {
+        let mut file = try!(
+            OpenOptions::new()
+                .write(true)
+                .truncate(true)
+                .create(true)
+                .open(filename.as_ref())
+        );
         self.write_to_policy(&mut file, policy)
     }
 
     /// Write to a writer
     pub fn write_to<W: Write>(&self, writer: &mut W) -> io::Result<()> {
         self.write_to_policy(writer, EscapePolicy::Basics)
     }
 
     /// Write to a writer
-    pub fn write_to_policy<W: Write>(&self,
-                                     writer: &mut W,
-                                     policy: EscapePolicy)
-                                     -> io::Result<()> {
+    pub fn write_to_policy<W: Write>(
+        &self,
+        writer: &mut W,
+        policy: EscapePolicy,
+    ) -> io::Result<()> {
         let mut firstline = true;
 
         match self.sections.get(&None) {
             Some(props) => {
                 for (k, v) in props.iter() {
                     let k_str = escape_str(&k[..], policy);
                     let v_str = escape_str(&v[..], policy);
                     try!(write!(writer, "{}={}\n", k_str, v_str));
@@ -451,36 +465,32 @@ impl Ini {
     pub fn load_from_str_noescape(buf: &str) -> Result<Ini, Error> {
         let mut parser = Parser::new(buf.chars(), true);
         parser.parse()
     }
 
     /// Load from a reader
     pub fn read_from<R: Read>(reader: &mut R) -> Result<Ini, Error> {
         let mut s = String::new();
-        try!(reader.read_to_string(&mut s).map_err(|err| {
-            Error {
-                line: 0,
-                col: 0,
-                msg: format!("{}", err),
-            }
+        try!(reader.read_to_string(&mut s).map_err(|err| Error {
+            line: 0,
+            col: 0,
+            msg: format!("{}", err),
         }));
         let mut parser = Parser::new(s.chars(), false);
         parser.parse()
     }
 
     /// Load from a reader, but do not interpret '\' as an escape character
     pub fn read_from_noescape<R: Read>(reader: &mut R) -> Result<Ini, Error> {
         let mut s = String::new();
-        try!(reader.read_to_string(&mut s).map_err(|err| {
-            Error {
-                line: 0,
-                col: 0,
-                msg: format!("{}", err),
-            }
+        try!(reader.read_to_string(&mut s).map_err(|err| Error {
+            line: 0,
+            col: 0,
+            msg: format!("{}", err),
         }));
         let mut parser = Parser::new(s.chars(), true);
         parser.parse()
     }
 
     /// Load from a file
     pub fn load_from_file<P: AsRef<Path>>(filename: P) -> Result<Ini, Error> {
         let mut reader = match File::open(filename.as_ref()) {
@@ -520,28 +530,34 @@ pub struct SectionIterator<'a> {
 /// Iterator for mutable sections
 pub struct SectionMutIterator<'a> {
     mapiter: IterMut<'a, Option<String>, Properties>,
 }
 
 impl<'a> Ini {
     /// Immutable iterate though sections
     pub fn iter(&'a self) -> SectionIterator<'a> {
-        SectionIterator { mapiter: self.sections.iter() }
+        SectionIterator {
+            mapiter: self.sections.iter(),
+        }
     }
 
     /// Mutable iterate though sections
     /// *Deprecated! Use `iter_mut` instead!*
     pub fn mut_iter(&'a mut self) -> SectionMutIterator<'a> {
-        SectionMutIterator { mapiter: self.sections.iter_mut() }
+        SectionMutIterator {
+            mapiter: self.sections.iter_mut(),
+        }
     }
 
     /// Mutable iterate though sections
     pub fn iter_mut(&'a mut self) -> SectionMutIterator<'a> {
-        SectionMutIterator { mapiter: self.sections.iter_mut() }
+        SectionMutIterator {
+            mapiter: self.sections.iter_mut(),
+        }
     }
 }
 
 impl<'a> Iterator for SectionIterator<'a> {
     type Item = (&'a Option<String>, &'a Properties);
 
     #[inline]
     fn next(&mut self) -> Option<(&'a Option<String>, &'a Properties)> {
@@ -587,17 +603,19 @@ impl Iterator for SectionIntoIter {
     }
 }
 
 impl IntoIterator for Ini {
     type Item = (Option<String>, Properties);
     type IntoIter = SectionIntoIter;
 
     fn into_iter(self) -> SectionIntoIter {
-        SectionIntoIter { iter: self.sections.into_iter() }
+        SectionIntoIter {
+            iter: self.sections.into_iter(),
+        }
     }
 }
 
 // Ini parser
 struct Parser<'a> {
     ch: Option<char>,
     rdr: Chars<'a>,
     line: usize,
@@ -692,61 +710,56 @@ impl<'a> Parser<'a> {
     /// Parse the whole INI input
     pub fn parse(&mut self) -> Result<Ini, Error> {
         let mut result = Ini::new();
         let mut curkey: String = "".into();
         let mut cursec: Option<String> = None;
 
         self.parse_whitespace();
         while let Some(cur_ch) = self.ch {
-            debug!("line:{}, col:{}", self.line, self.col);
             match cur_ch {
                 ';' | '#' => {
                     self.parse_comment();
-                    debug!("parse comment");
                 }
-                '[' => {
-                    match self.parse_section() {
-                        Ok(sec) => {
-                            let msec = &sec[..].trim();
-                            debug!("Got section: {}", msec);
-                            cursec = Some(msec.to_string());
-                            result.sections.entry(cursec.clone()).or_insert(HashMap::new());
-                            self.bump();
-                        }
-                        Err(e) => return Err(e),
+                '[' => match self.parse_section() {
+                    Ok(sec) => {
+                        let msec = &sec[..].trim();
+                        cursec = Some(msec.to_string());
+                        result
+                            .sections
+                            .entry(cursec.clone())
+                            .or_insert(HashMap::new());
+                        self.bump();
                     }
-                }
+                    Err(e) => return Err(e),
+                },
                 '=' | ':' => {
                     if (&curkey[..]).is_empty() {
                         return self.error("Missing key".to_string());
                     }
                     match self.parse_val() {
                         Ok(val) => {
                             let mval = val[..].trim().to_owned();
-                            debug!("Got value: {}", mval);
-                            let sec = result.sections
+                            let sec = result
+                                .sections
                                 .entry(cursec.clone())
                                 .or_insert(HashMap::new());
                             sec.insert(curkey, mval);
                             curkey = "".into();
                         }
                         Err(e) => return Err(e),
                     }
                 }
-                _ => {
-                    match self.parse_key() {
-                        Ok(key) => {
-                            let mkey: String = key[..].trim().to_owned();
-                            debug!("Got key: {}", mkey);
-                            curkey = mkey.into();
-                        }
-                        Err(e) => return Err(e),
+                _ => match self.parse_key() {
+                    Ok(key) => {
+                        let mkey: String = key[..].trim().to_owned();
+                        curkey = mkey.into();
                     }
-                }
+                    Err(e) => return Err(e),
+                },
             }
 
             self.parse_whitespace();
         }
 
         Ok(result)
     }
 
@@ -781,24 +794,28 @@ impl<'a> Parser<'a> {
                         'n' => result.push('\n'),
                         '\n' => (),
                         'x' => {
                             // Unicode 4 character
                             let mut code: String = String::with_capacity(4);
                             for _ in 0..4 {
                                 self.bump();
                                 if self.eof() {
-                                    return self.error(format!("Expecting \"{:?}\" but found EOF.",
-                                                              endpoint));
+                                    return self.error(format!(
+                                        "Expecting \"{:?}\" but found EOF.",
+                                        endpoint
+                                    ));
                                 } else if let Some('\\') = self.ch {
                                     self.bump();
                                     if self.ch != Some('\n') {
-                                        return self.error(format!("Expecting \"\\\\n\" but \
-                                                                   found \"{:?}\".",
-                                                                  self.ch));
+                                        return self.error(format!(
+                                            "Expecting \"\\\\n\" but \
+                                             found \"{:?}\".",
+                                            self.ch
+                                        ));
                                     }
                                 }
                                 code.push(self.ch.unwrap());
                             }
                             let r = u32::from_str_radix(&code[..], 16);
                             match r {
                                 Ok(c) => result.push(char::from_u32(c).unwrap()),
                                 Err(_) => return self.error("Unknown character.".to_string()),
@@ -873,17 +890,16 @@ mod test {
         let key1: String = "key1".into();
         assert!(sec1.contains_key(&key1));
         let key2: String = "key2".into();
         assert!(sec1.contains_key(&key2));
         let val1: String = "val1".into();
         assert_eq!(sec1[&key1], val1);
         let val2: String = "377".into();
         assert_eq!(sec1[&key2], val2);
-
     }
 
     #[test]
     fn load_from_str_without_ending_newline() {
         let input = "[sec1]\nkey1=val1\nkey2=377\n[sec2]foo=bar";
         let opt = Ini::load_from_str(input);
         assert!(opt.is_ok());
     }
@@ -935,18 +951,20 @@ gender = mail ; abdddd
     fn test_colon() {
         let input = "
 [section name]
 name: hello # abcdefg
 gender : mail ; abdddd
 ";
         let ini = Ini::load_from_str(input).unwrap();
         assert_eq!(ini.get_from(Some("section name"), "name").unwrap(), "hello");
-        assert_eq!(ini.get_from(Some("section name"), "gender").unwrap(),
-                   "mail");
+        assert_eq!(
+            ini.get_from(Some("section name"), "gender").unwrap(),
+            "mail"
+        );
     }
 
     #[test]
     fn test_string() {
         let input = "
 [section name]
 # This is a comment
 Key = \"Value\"
@@ -959,31 +977,35 @@ Key = \"Value\"
     fn test_string_multiline() {
         let input = "
 [section name]
 # This is a comment
 Key = \"Value
 Otherline\"
 ";
         let ini = Ini::load_from_str(input).unwrap();
-        assert_eq!(ini.get_from(Some("section name"), "Key").unwrap(),
-                   "Value\nOtherline");
+        assert_eq!(
+            ini.get_from(Some("section name"), "Key").unwrap(),
+            "Value\nOtherline"
+        );
     }
 
     #[test]
     fn test_string_comment() {
         let input = "
 [section name]
 # This is a comment
 Key = \"Value   # This is not a comment ; at all\"
 Stuff = Other
 ";
         let ini = Ini::load_from_str(input).unwrap();
-        assert_eq!(ini.get_from(Some("section name"), "Key").unwrap(),
-                   "Value   # This is not a comment ; at all");
+        assert_eq!(
+            ini.get_from(Some("section name"), "Key").unwrap(),
+            "Value   # This is not a comment ; at all"
+        );
     }
 
     #[test]
     fn test_string_single() {
         let input = "
 [section name]
 # This is a comment
 Key = 'Value'
@@ -996,44 +1018,50 @@ Stuff = Other
     #[test]
     fn test_string_includes_quote() {
         let input = "
 [Test]
 Comment[tr]=İnternet'e erişin
 Comment[uk]=Доступ до Інтернету
 ";
         let ini = Ini::load_from_str(input).unwrap();
-        assert_eq!(ini.get_from(Some("Test"), "Comment[tr]").unwrap(),
-                   "İnternet'e erişin");
+        assert_eq!(
+            ini.get_from(Some("Test"), "Comment[tr]").unwrap(),
+            "İnternet'e erişin"
+        );
     }
 
     #[test]
     fn test_string_single_multiline() {
         let input = "
 [section name]
 # This is a comment
 Key = 'Value
 Otherline'
 Stuff = Other
 ";
         let ini = Ini::load_from_str(input).unwrap();
-        assert_eq!(ini.get_from(Some("section name"), "Key").unwrap(),
-                   "Value\nOtherline");
+        assert_eq!(
+            ini.get_from(Some("section name"), "Key").unwrap(),
+            "Value\nOtherline"
+        );
     }
 
     #[test]
     fn test_string_single_comment() {
         let input = "
 [section name]
 # This is a comment
 Key = 'Value   # This is not a comment ; at all'
 ";
         let ini = Ini::load_from_str(input).unwrap();
-        assert_eq!(ini.get_from(Some("section name"), "Key").unwrap(),
-                   "Value   # This is not a comment ; at all");
+        assert_eq!(
+            ini.get_from(Some("section name"), "Key").unwrap(),
+            "Value   # This is not a comment ; at all"
+        );
     }
 
     #[test]
     fn load_from_str_with_valid_empty_input() {
         let input = "key1=\nkey2=val2\n";
         let opt = Ini::load_from_str(input);
         assert!(opt.is_ok());
 
--- a/third_party/rust/rust-ini/src/lib.rs
+++ b/third_party/rust/rust-ini/src/lib.rs
@@ -38,12 +38,10 @@
 //! for (sec, prop) in i.iter() {
 //!    println!("Section: {:?}", *sec);
 //!    for (k, v) in prop.iter() {
 //!        println!("{}:{}", *k, *v);
 //!    }
 //! }
 //! ```
 
-#[macro_use] extern crate log;
-
 pub use ini::Ini;
 pub mod ini;