From e8097b14f1ea246bf97af380670c502ba1517f30 Mon Sep 17 00:00:00 2001 From: "leonardo.yvens" Date: Fri, 3 Jun 2016 23:14:42 -0300 Subject: Clippy run --- src/encoder/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/encoder/mod.rs') diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs index fb628fa..304bac6 100644 --- a/src/encoder/mod.rs +++ b/src/encoder/mod.rs @@ -35,6 +35,7 @@ use {Value, Table}; /// assert_eq!(e.toml.get(&"foo".to_string()), Some(&Value::Integer(4))) /// # } /// ``` +#[derive(Default)] pub struct Encoder { /// Output TOML that is emitted. The current version of this encoder forces /// the top-level representation of a structure to be a table. @@ -73,6 +74,10 @@ enum State { NextMapKey, } +impl Default for State { + fn default() -> State { State::Start } +} + impl Encoder { /// Constructs a new encoder which will emit to the given output stream. pub fn new() -> Encoder { -- cgit v1.2.3