Propagate cancellation errors in OnceMap (#1032)

## Summary

Ensures that if an operation is cancelled in one thread, we propagate it
to others rather than panicking.

Related to https://github.com/astral-sh/puffin/issues/1005.
This commit is contained in:
Charlie Marsh 2024-01-22 09:00:21 -05:00 committed by GitHub
parent db0c76c4ba
commit e09a51653e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 25 additions and 10 deletions

View file

@ -36,6 +36,9 @@ pub enum ResolveError {
#[error(transparent)]
Join(#[from] tokio::task::JoinError),
#[error(transparent)]
OnceMap(#[from] once_map::Error),
#[error("Package metadata name `{metadata}` does not match given name `{given}`")]
NameMismatch {
given: PackageName,