(
store: &Arc<dyn SessionStore>,
session_id: &str,
)
| 409 | } |
| 410 | |
| 411 | fn load_verification_reports( |
| 412 | store: &Arc<dyn SessionStore>, |
| 413 | session_id: &str, |
| 414 | ) -> Result<Option<Vec<crate::verification::VerificationReport>>> { |
| 415 | match tokio::runtime::Handle::try_current() { |
| 416 | Ok(handle) => tokio::task::block_in_place(|| { |
| 417 | handle.block_on(store.load_verification_reports(session_id)) |
| 418 | }) |
| 419 | .map_err(|e| { |
| 420 | CodeError::Session(format!( |
| 421 | "Failed to load verification reports for session {}: {}", |
| 422 | session_id, e |
| 423 | )) |
| 424 | }), |
| 425 | Err(_) => Ok(None), |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | #[cfg(test)] |
| 430 | mod tests { |
no test coverage detected