diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-06-05 07:46:17 +0200 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-06-05 07:46:17 +0200 |
commit | fb8050d2d556dd613971f15e7bd73cfd43acad82 (patch) | |
tree | eaae854e5e6d5b61e9039d30217f821a8a2f30f7 /src/lib.rs | |
parent | 7363dbe7f599a2373e6e2a749f51c76469dabdcf (diff) | |
parent | e8097b14f1ea246bf97af380670c502ba1517f30 (diff) | |
download | milf-rs-fb8050d2d556dd613971f15e7bd73cfd43acad82.tar.gz milf-rs-fb8050d2d556dd613971f15e7bd73cfd43acad82.zip |
Merge pull request #101 from leodasvacas/clippy-run
Clippy run and implement Default for State and Enconder
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -72,10 +72,10 @@ pub enum Value { Table(Table), } -/// Type representing a TOML array, payload of the Value::Array variant +/// Type representing a TOML array, payload of the `Value::Array` variant pub type Array = Vec<Value>; -/// Type representing a TOML table, payload of the Value::Table variant +/// Type representing a TOML table, payload of the `Value::Table` variant pub type Table = BTreeMap<String, Value>; impl Value { @@ -186,7 +186,7 @@ impl Value { None => return None, }; let mut cur_value = self; - if path.len() == 0 { + if path.is_empty() { return Some(cur_value) } @@ -247,7 +247,7 @@ impl Value { }; let mut cur = self; - if path.len() == 0 { + if path.is_empty() { return Some(cur) } |