Don't crash when cid isn't there
Although I don't know why that would happen
This commit is contained in:
parent
a7e5384dfb
commit
7f403657aa
src
|
@ -69,7 +69,7 @@ async fn extract_post_operations(commit: &Commit) -> Result<Vec<PostOperation>>
|
|||
continue;
|
||||
}
|
||||
|
||||
let cid = op.cid.expect("cid is not there, what").to_string();
|
||||
let cid = op.cid.ok_or(anyhow!("cid is not there, how is that possible"))?.to_string();
|
||||
|
||||
if let Some((_, item)) = items.iter().find(|(cid, _)| Some(*cid) == op.cid) {
|
||||
let record: Record = ciborium::from_reader(&mut item.as_slice())?;
|
||||
|
|
Loading…
Reference in New Issue