diff options
author | leonardo.yvens <leoyvens@gmail.com> | 2016-06-03 23:14:42 -0300 |
---|---|---|
committer | leonardo.yvens <leoyvens@gmail.com> | 2016-06-03 23:19:15 -0300 |
commit | e8097b14f1ea246bf97af380670c502ba1517f30 (patch) | |
tree | 40af4185d533d301627959030c2c380771f8f460 /src/decoder/mod.rs | |
parent | 44fc9d9f37cd1b2e3d9170d04fd0a8a04d7884ff (diff) | |
download | milf-rs-e8097b14f1ea246bf97af380670c502ba1517f30.tar.gz milf-rs-e8097b14f1ea246bf97af380670c502ba1517f30.zip |
Clippy run
Diffstat (limited to 'src/decoder/mod.rs')
-rw-r--r-- | src/decoder/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs index a596280..b223e03 100644 --- a/src/decoder/mod.rs +++ b/src/decoder/mod.rs @@ -126,11 +126,11 @@ impl Decoder { fn sub_decoder(&self, toml: Option<Value>, field: &str) -> Decoder { Decoder { toml: toml, - cur_field: if field.len() == 0 { + cur_field: if field.is_empty() { self.cur_field.clone() } else { match self.cur_field { - None => Some(format!("{}", field)), + None => Some(field.to_string()), Some(ref s) => Some(format!("{}.{}", s, field)) } }, @@ -172,7 +172,7 @@ impl fmt::Display for DecodeError { ExpectedType(expected, found) => { fn humanize(s: &str) -> String { if s == "section" { - format!("a section") + "a section".to_string() } else { format!("a value of type `{}`", s) } |