restore a few unneeded breaking changes
This commit is contained in:
1 parent
14c852010b
commit
4ee4cf23d3
6 files changed
+219
-6
No files matched your search
@@ -135,7 +135,7 @@ impl<T: std::fmt::Debug> std::fmt::Debug for Event<T> {
|
||||
/// }
|
||||
///
|
||||
/// ```
|
||||
pub struct EventHandler<'bump, T: ?Sized = ()> {
|
||||
pub struct EventHandler<'bump, T = ()> {
|
||||
pub(crate) origin: ScopeId,
|
||||
pub(super) callback: RefCell<Option<ExternalListenerCallback<'bump, T>>>,
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ where
|
||||
.flatten()
|
||||
}
|
||||
|
||||
pub struct Runtime {
|
||||
pub(crate) struct Runtime {
|
||||
pub(crate) scope_contexts: RefCell<Vec<Option<ScopeContext>>>,
|
||||
pub(crate) scheduler: Rc<Scheduler>,
|
||||
|
||||
@@ -93,10 +93,10 @@ impl Runtime {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RuntimeGuard(Rc<Runtime>);
|
||||
pub(crate) struct RuntimeGuard(Rc<Runtime>);
|
||||
|
||||
impl RuntimeGuard {
|
||||
pub fn new(runtime: Rc<Runtime>) -> Self {
|
||||
pub(crate) fn new(runtime: Rc<Runtime>) -> Self {
|
||||
push_runtime(runtime.clone());
|
||||
Self(runtime)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use std::{
|
||||
/// A component's state separate from its props.
|
||||
///
|
||||
/// This struct exists to provide a common interface for all scopes without relying on generics.
|
||||
pub struct ScopeContext {
|
||||
pub(crate) struct ScopeContext {
|
||||
pub(crate) name: &'static str,
|
||||
|
||||
pub(crate) id: ScopeId,
|
||||
|
||||
@@ -195,7 +195,7 @@ impl<'src> ScopeState {
|
||||
///
|
||||
/// assert_eq!(base.parent(), None);
|
||||
/// ```
|
||||
pub fn parent_id(&self) -> Option<ScopeId> {
|
||||
pub fn parent(&self) -> Option<ScopeId> {
|
||||
// safety: the pointer to our parent is *always* valid thanks to the bump arena
|
||||
self.context().parent_id()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user