From d6c109d456205ad22185c9c68ffe6deb88f48ece Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 19 Mar 2021 17:30:44 +0100 Subject: [PATCH] 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 --- xtask/src/license_headers_check.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xtask/src/license_headers_check.rs b/xtask/src/license_headers_check.rs index 167adcd95..bba2b1bcf 100644 --- a/xtask/src/license_headers_check.rs +++ b/xtask/src/license_headers_check.rs @@ -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(),