diff --git a/lib/runtime-c-api/src/error.rs b/lib/runtime-c-api/src/error.rs index aea8691e9..444bf61ee 100644 --- a/lib/runtime-c-api/src/error.rs +++ b/lib/runtime-c-api/src/error.rs @@ -8,7 +8,7 @@ use std::ptr; use std::slice; thread_local! { - static LAST_ERROR: RefCell>> = RefCell::new(None); + static LAST_ERROR: RefCell>> = RefCell::new(None); } pub fn update_last_error(err: E) { @@ -18,7 +18,7 @@ pub fn update_last_error(err: E) { } /// Retrieve the most recent error, clearing it in the process. -pub(crate) fn take_last_error() -> Option> { +pub(crate) fn take_last_error() -> Option> { LAST_ERROR.with(|prev| prev.borrow_mut().take()) }