* Avoid thread issues.

* Remove accident file
This commit is contained in:
Gav Wood authored and Robert Habermeier committed 2018-01-23 16:46:33 +01:00
1 parent 3402f169a7
commit 6bc1c3265e
3 files changed
+2 -2

No files matched your search

@@ -37,7 +37,7 @@ pub fn with_env<T, F: FnOnce(&mut Environment) -> T>(f: F) -> T {
f(&mut *eb)
}
#[cfg(not(test))]
#[cfg(target_arch = "wasm32")]
fn env() -> Rc<RefCell<Environment>> {
// Initialize it to a null value
static mut SINGLETON: *const Rc<RefCell<Environment>> = 0 as *const Rc<RefCell<Environment>>;
@@ -56,7 +56,7 @@ fn env() -> Rc<RefCell<Environment>> {
}
}
#[cfg(test)]
#[cfg(not(target_arch = "wasm32"))]
fn env() -> Rc<RefCell<Environment>> {
// Initialize it to a null value
thread_local!{