clean up some core context APIs
This commit is contained in:
1 parent
d51b6268eb
commit
6c29e2b825
4 files changed
+7
-7
No files matched your search
@@ -33,7 +33,7 @@ fn current_owner() -> Rc<Owner> {
|
||||
Some(rt) => rt,
|
||||
None => {
|
||||
let owner = Rc::new(current_store().owner());
|
||||
provide_context(owner).expect("in a virtual dom")
|
||||
provide_context(owner)
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -44,7 +44,7 @@ fn owner_in_scope(scope: ScopeId) -> Rc<Owner> {
|
||||
Some(rt) => rt,
|
||||
None => {
|
||||
let owner = Rc::new(current_store().owner());
|
||||
scope.provide_context(owner).expect("in a virtual dom")
|
||||
scope.provide_context(owner)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ fn current_unsubscriber() -> Unsubscriber {
|
||||
scope: current_scope_id().expect("in a virtual dom"),
|
||||
subscribers: Default::default(),
|
||||
};
|
||||
provide_context(owner).expect("in a virtual dom")
|
||||
provide_context(owner)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user