For error handling and breakpoints, use Box<Any + Send> instead of Box<Any>.

This commit is contained in:
Nick Lewycky
2019-12-09 18:22:30 -08:00
parent 12daaba3fd
commit 0a278c55ee
12 changed files with 36 additions and 34 deletions

View File

@ -23,7 +23,7 @@ use wasmparser::{Operator, Type as WpType};
/// A type that defines a function pointer, which is called when breakpoints occur.
pub type BreakpointHandler =
Box<dyn Fn(BreakpointInfo) -> Result<(), Box<dyn Any>> + Send + Sync + 'static>;
Box<dyn Fn(BreakpointInfo) -> Result<(), Box<dyn Any + Send>> + Send + Sync + 'static>;
/// Maps instruction pointers to their breakpoint handlers.
pub type BreakpointMap = Arc<HashMap<usize, BreakpointHandler>>;