Fix clippy warning

This commit is contained in:
Yuheng Chen 2016-09-22 16:54:51 +08:00
parent ab31ddfddc
commit 93e7192485

View file

@ -345,7 +345,10 @@ impl IntoIterator for Yaml {
type IntoIter = YamlIter;
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()
}
}
}