We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.ok_or_else()
.unwrap()
1 parent 549dc30 commit 240cf16Copy full SHA for 240cf16
src/base/value.rs
@@ -981,12 +981,10 @@ impl BasicValue {
981
let tag_id = obj_iter
982
.next()
983
.and_then(|value| value.as_u64().map(|num_u64| num_u64 as usize))
984
- .ok_or_else(|| anyhow::anyhow!("`tag_id` is not available in the value"))?;
+ .unwrap();
985
986
// Take second element
987
- let value = obj_iter
988
- .next()
989
- .ok_or_else(|| anyhow::anyhow!("`value` is not available in the value"))?;
+ let value = obj_iter.next().unwrap();
990
991
let cur_type = typ.types.get(tag_id)
992
.ok_or_else(|| anyhow::anyhow!("No type in `tag_id` \"{tag_id}\" found"))?;
0 commit comments