in lieu of a reproducible testcase, this should fix the unwrap error. Closes #398

This commit is contained in:
Christien Rioux 2024-08-20 19:00:27 -04:00
parent d09f78c9ab
commit f3cbfbe610

View File

@ -306,13 +306,11 @@ impl StorageManager {
// No result // No result
apibail_key_not_found!(key); apibail_key_not_found!(key);
}; };
let last_seq = result let opt_last_seq = result
.get_result .get_result
.opt_value .opt_value
.as_ref() .as_ref()
.unwrap() .map(|s| s.value_data().seq());
.value_data()
.seq();
// Reopen inner to store value we just got // Reopen inner to store value we just got
let mut inner = self.lock().await?; let mut inner = self.lock().await?;
@ -334,9 +332,11 @@ impl StorageManager {
.await; .await;
if out.is_ok() { if out.is_ok() {
self.process_deferred_outbound_get_value_result_inner( if let Some(last_seq) = opt_last_seq {
&mut inner, res_rx, key, subkey, last_seq, self.process_deferred_outbound_get_value_result_inner(
); &mut inner, res_rx, key, subkey, last_seq,
);
}
} }
out out
} }