aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-06-05 07:46:17 +0200
committerAlex Crichton <alex@alexcrichton.com>2016-06-05 07:46:17 +0200
commitfb8050d2d556dd613971f15e7bd73cfd43acad82 (patch)
treeeaae854e5e6d5b61e9039d30217f821a8a2f30f7 /src/lib.rs
parent7363dbe7f599a2373e6e2a749f51c76469dabdcf (diff)
parente8097b14f1ea246bf97af380670c502ba1517f30 (diff)
downloadmilf-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.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 79a015d..a8e7dbb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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)
}