Skip to content

Commit

Permalink
Merge pull request neon-bindings#335 from kjvalencik/static
Browse files Browse the repository at this point in the history
Task trait should be marked 'static. Fixes neon-bindings#288.
  • Loading branch information
dherman authored Jul 24, 2018
2 parents f110ad8 + 2321abd commit cc48fda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use neon_runtime;
use neon_runtime::raw;

/// A Rust task that can be executed in a background thread.
pub trait Task: Send + Sized {
pub trait Task: Send + Sized + 'static {
/// The task's result type, which is sent back to the main thread to communicate a successful result back to JavaScript.
type Output: Send;
type Output: Send + 'static;

/// The task's error type, which is sent back to the main thread to communicate a task failure back to JavaScript.
type Error: Send;
type Error: Send + 'static;

/// The type of JavaScript value that gets produced to the asynchronous callback on the main thread after the task is completed.
type JsEvent: Value;
Expand Down

0 comments on commit cc48fda

Please sign in to comment.