Remove UnwindSafe bound on Unsend jobs

This commit is contained in:
asonix 2024-01-07 18:54:14 -06:00
parent 4809c123c2
commit 496c40ddd4
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ impl<T> Drop for ActixHandle<T> {
/// This trait is used to implement generic Unsend Jobs in the background jobs library. It requires
/// that implementors specify a spawning mechanism that can turn an Unsend future into a Send
/// future
pub trait ActixJob: Serialize + DeserializeOwned + std::panic::UnwindSafe + 'static {
pub trait ActixJob: Serialize + DeserializeOwned + 'static {
/// The application state provided to this job at runtime.
type State: Clone + 'static;

View file

@ -148,7 +148,7 @@ where
impl<T> Job for T
where
T: UnsendJob + std::panic::UnwindSafe,
T: UnsendJob,
{
type State = T::State;
type Future = UnwrapFuture<<T::Spawner as UnsendSpawner>::Handle<Result<(), Error>>>;