mirror of
https://git.asonix.dog/asonix/background-jobs.git
synced 2024-11-25 13:30:59 +00:00
Remove UnwindSafe bound on Unsend jobs
This commit is contained in:
parent
4809c123c2
commit
496c40ddd4
2 changed files with 2 additions and 2 deletions
|
@ -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
|
/// 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
|
/// that implementors specify a spawning mechanism that can turn an Unsend future into a Send
|
||||||
/// future
|
/// 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.
|
/// The application state provided to this job at runtime.
|
||||||
type State: Clone + 'static;
|
type State: Clone + 'static;
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ where
|
||||||
|
|
||||||
impl<T> Job for T
|
impl<T> Job for T
|
||||||
where
|
where
|
||||||
T: UnsendJob + std::panic::UnwindSafe,
|
T: UnsendJob,
|
||||||
{
|
{
|
||||||
type State = T::State;
|
type State = T::State;
|
||||||
type Future = UnwrapFuture<<T::Spawner as UnsendSpawner>::Handle<Result<(), Error>>>;
|
type Future = UnwrapFuture<<T::Spawner as UnsendSpawner>::Handle<Result<(), Error>>>;
|
||||||
|
|
Loading…
Reference in a new issue