mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 12:40:04 +00:00
Merge pull request #223 from NobodyXu/fix/join-err
Fix: join err handling, unify it using `BinstallError`
This commit is contained in:
commit
6964eee5d1
3 changed files with 17 additions and 14 deletions
|
@ -53,7 +53,7 @@ pub fn cargo_home() -> Result<&'static Path, io::Error> {
|
|||
pub async fn await_task<T>(task: tokio::task::JoinHandle<miette::Result<T>>) -> miette::Result<T> {
|
||||
match task.await {
|
||||
Ok(res) => res,
|
||||
Err(join_err) => Err(miette::miette!("Task failed to join: {}", join_err)),
|
||||
Err(join_err) => Err(BinstallError::from(join_err).into()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue