WIP
This commit is contained in:
parent
50bbdd5cab
commit
db6a3e1783
6 changed files with 174 additions and 126 deletions
|
@ -153,16 +153,6 @@ pub trait BorrowAppContext {
|
|||
result
|
||||
}
|
||||
|
||||
fn with_global<T: Send + Sync + 'static, F, R>(&mut self, global: T, f: F) -> R
|
||||
where
|
||||
F: FnOnce(&mut Self) -> R,
|
||||
{
|
||||
self.app_mut().push_global(global);
|
||||
let result = f(self);
|
||||
self.app_mut().pop_global::<T>();
|
||||
result
|
||||
}
|
||||
|
||||
fn set_global<T: Send + Sync + 'static>(&mut self, global: T) {
|
||||
self.app_mut().set_global(global)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue