From 635a97f8209a61d9eb33c703805923c836bd0e74 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 15 Nov 2016 10:56:23 +0100 Subject: [PATCH] Use a less strict bound for wrap_panic. This is what's required for catch_unwind; there's no need to be stricter. --- src/panic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panic.rs b/src/panic.rs index ae1c2cdba..351e24f77 100644 --- a/src/panic.rs +++ b/src/panic.rs @@ -17,7 +17,7 @@ pub fn maybe_resume_unwind() { /// Generic wrapper for JS engine callbacks panic-catching pub fn wrap_panic(function: F, generic_return_type: R) -> R - where F: FnMut() -> R + UnwindSafe + where F: FnOnce() -> R + UnwindSafe { let result = catch_unwind(function); match result {