(closure: impl FnOnce() -> Result<(), Report<E>>)
| 178 | } |
| 179 | |
| 180 | pub fn capture_ok<E>(closure: impl FnOnce() -> Result<(), Report<E>>) { |
| 181 | closure().expect("expected an OK value, found an error"); |
| 182 | } |
| 183 | |
| 184 | pub fn capture_error<E>(closure: impl FnOnce() -> Result<(), Report<E>>) -> Report<E> { |
| 185 | closure().expect_err("expected an error") |