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
.iter()
.filter_map(|(name, entry)| {
CargoDependency::new(entry.as_value().unwrap())
.map(|entry| (name.to_owned(), entry))
entry.as_value().and_then(|entry| {
CargoDependency::new(entry).map(|entry| (name.to_owned(), entry))
})
})
.collect(),
None => Vec::new(),