(future: F)
| 202 | } |
| 203 | |
| 204 | async fn catch_future_panic<T, E, F>(future: F) -> PyResult<Result<T, E>> |
| 205 | where |
| 206 | F: Future<Output = Result<T, E>>, |
| 207 | { |
| 208 | AssertUnwindSafe(future) |
| 209 | .catch_unwind() |
| 210 | .await |
| 211 | .map_err(panic_to_pyerr) |
| 212 | } |
| 213 | |
| 214 | async fn wait_for_sync_result<T, E, F>(future: F) -> PyResult<Result<T, E>> |
| 215 | where |
no outgoing calls
no test coverage detected