mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 21:51:06 +00:00
Merge branch 'master' into runtime-tweaks
This commit is contained in:
@@ -41,7 +41,7 @@ pub fn with_env<T, F: FnOnce(&mut Environment) -> T>(f: F) -> T {
|
|||||||
f(&mut *eb)
|
f(&mut *eb)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(target_arch = "wasm32")]
|
||||||
fn env() -> Rc<RefCell<Environment>> {
|
fn env() -> Rc<RefCell<Environment>> {
|
||||||
// Initialize it to a null value
|
// Initialize it to a null value
|
||||||
static mut SINGLETON: *const Rc<RefCell<Environment>> = 0 as *const Rc<RefCell<Environment>>;
|
static mut SINGLETON: *const Rc<RefCell<Environment>> = 0 as *const Rc<RefCell<Environment>>;
|
||||||
@@ -60,7 +60,7 @@ fn env() -> Rc<RefCell<Environment>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
fn env() -> Rc<RefCell<Environment>> {
|
fn env() -> Rc<RefCell<Environment>> {
|
||||||
// Initialize it to a null value
|
// Initialize it to a null value
|
||||||
thread_local!{
|
thread_local!{
|
||||||
|
|||||||
Reference in New Issue
Block a user