refact(python): replace unwrap

This commit is contained in:
steven-omaha
2023-03-29 14:18:51 +02:00
parent 9b8f2712d3
commit b01d5ea9df
@@ -65,7 +65,7 @@ fn extract_pacdef_packages(value: Value) -> Result<HashSet<Package>> {
.as_array()
.context("getting inner json array")?
.iter()
.map(|node| node["name"].as_str().unwrap())
.map(|node| node["name"].as_str().expect("should always be a string"))
.map(Package::from)
.collect();
Ok(result)