Don't crash when encounting the spin_on conditionaly dependency

I need to see if this is correct, but meanwhile this should fix the CI
This commit is contained in:
Simon Hausmann 2021-03-19 17:30:44 +01:00
parent 9eecdefb35
commit d6c109d456

View file

@ -358,8 +358,9 @@ impl CargoToml {
Some(dep_table) => dep_table Some(dep_table) => dep_table
.iter() .iter()
.filter_map(|(name, entry)| { .filter_map(|(name, entry)| {
CargoDependency::new(entry.as_value().unwrap()) entry.as_value().and_then(|entry| {
.map(|entry| (name.to_owned(), entry)) CargoDependency::new(entry).map(|entry| (name.to_owned(), entry))
})
}) })
.collect(), .collect(),
None => Vec::new(), None => Vec::new(),