refact(python): replace unwrap
This commit is contained in:
@@ -65,7 +65,7 @@ fn extract_pacdef_packages(value: Value) -> Result<HashSet<Package>> {
|
|||||||
.as_array()
|
.as_array()
|
||||||
.context("getting inner json array")?
|
.context("getting inner json array")?
|
||||||
.iter()
|
.iter()
|
||||||
.map(|node| node["name"].as_str().unwrap())
|
.map(|node| node["name"].as_str().expect("should always be a string"))
|
||||||
.map(Package::from)
|
.map(Package::from)
|
||||||
.collect();
|
.collect();
|
||||||
Ok(result)
|
Ok(result)
|
||||||
|
|||||||
Reference in New Issue
Block a user