chore(runtime-c-api) Simplify code.

This commit is contained in:
Ivan Enderlin
2020-02-10 11:47:04 +01:00
parent c54c8297f5
commit 285c564de1

View File

@ -1,11 +1,12 @@
//! Read runtime errors. //! Read runtime errors.
use libc::{c_char, c_int}; use libc::{c_char, c_int};
use std::cell::RefCell; use std::{
use std::error::Error; cell::RefCell,
use std::fmt::{self, Display, Formatter}; error::Error,
use std::ptr; fmt::{self, Display, Formatter},
use std::slice; ptr, slice,
};
thread_local! { thread_local! {
static LAST_ERROR: RefCell<Option<Box<dyn Error>>> = RefCell::new(None); static LAST_ERROR: RefCell<Option<Box<dyn Error>>> = RefCell::new(None);