Refactor: Extract new crate binstalk-fetchers (#1291)

To reduce `binstalk` codegen and enable better reuse.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-08-14 13:20:34 +10:00 committed by GitHub
parent 623f7ff4ed
commit 76c72469eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1008 additions and 122 deletions

View file

@ -60,8 +60,11 @@ impl<T> Future for AutoAbortJoinHandle<T> {
}
}
impl<T> AutoAbortJoinHandle<Result<T, BinstallError>> {
impl<T, E> AutoAbortJoinHandle<Result<T, E>>
where
E: Into<BinstallError>,
{
pub async fn flattened_join(self) -> Result<T, BinstallError> {
self.await?
self.await?.map_err(Into::into)
}
}