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.
use libc::{c_char, c_int};
use std::cell::RefCell;
use std::error::Error;
use std::fmt::{self, Display, Formatter};
use std::ptr;
use std::slice;
use std::{
cell::RefCell,
error::Error,
fmt::{self, Display, Formatter},
ptr, slice,
};
thread_local! {
static LAST_ERROR: RefCell<Option<Box<dyn Error>>> = RefCell::new(None);