Method
error_ext_zip
(mut self, mut f: impl FnMut(Error) -> Result<T, Error>)
Source from the content-addressed store, hash-verified
| 892 | |
| 893 | #[inline] |
| 894 | fn error_ext_zip<T>(mut self, mut f: impl FnMut(Error) -> Result<T, Error>) -> Result<T, Self> { |
| 895 | let mut maybe_link = Some(&mut self); |
| 896 | while let Some(link) = maybe_link.take() { |
| 897 | let e = mem::replace(link, OutOfMemory::new(1).into()); |
| 898 | *link = match f(e) { |
| 899 | Ok(x) => return Ok(x), |
| 900 | Err(e) => e, |
| 901 | }; |
| 902 | maybe_link = link.inner.source_mut(); |
| 903 | } |
| 904 | Err(self) |
| 905 | } |
| 906 | |
| 907 | /// Is this an `E` error? |
| 908 | /// |
Tested by
no test coverage detected