Fix clippy warning

This commit is contained in:
Yuheng Chen 2016-09-22 16:54:51 +08:00
parent cbcc7e69d4
commit 6d23811831

View file

@ -345,7 +345,10 @@ impl IntoIterator for Yaml {
type IntoIter = YamlIter; type IntoIter = YamlIter;
fn into_iter(self) -> Self::IntoIter { fn into_iter(self) -> Self::IntoIter {
YamlIter {yaml: self.into_vec().unwrap_or(vec![]).into_iter()} YamlIter {
yaml: self.into_vec()
.unwrap_or_else(Vec::new).into_iter()
}
} }
} }