mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 13:41:32 +00:00
Fix more bare dyn traits in runtime-c-api
This commit is contained in:
@ -8,7 +8,7 @@ use std::ptr;
|
|||||||
use std::slice;
|
use std::slice;
|
||||||
|
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static LAST_ERROR: RefCell<Option<Box<Error>>> = RefCell::new(None);
|
static LAST_ERROR: RefCell<Option<Box<dyn Error>>> = RefCell::new(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_last_error<E: Error + 'static>(err: E) {
|
pub fn update_last_error<E: Error + 'static>(err: E) {
|
||||||
@ -18,7 +18,7 @@ pub fn update_last_error<E: Error + 'static>(err: E) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Retrieve the most recent error, clearing it in the process.
|
/// Retrieve the most recent error, clearing it in the process.
|
||||||
pub(crate) fn take_last_error() -> Option<Box<Error>> {
|
pub(crate) fn take_last_error() -> Option<Box<dyn Error>> {
|
||||||
LAST_ERROR.with(|prev| prev.borrow_mut().take())
|
LAST_ERROR.with(|prev| prev.borrow_mut().take())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user