mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-17 06:08:26 +00:00
make entry key return scopeid
This commit is contained in:
parent
bdb63d18f3
commit
82e2175500
2 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ impl VirtualDom {
|
|||
let parent = self.acquire_current_scope_raw();
|
||||
let entry = self.scopes.vacant_entry();
|
||||
let height = unsafe { parent.map(|f| (*f).height + 1).unwrap_or(0) };
|
||||
let id = ScopeId(entry.key());
|
||||
let id = entry.key();
|
||||
|
||||
entry.insert(ScopeState {
|
||||
parent,
|
||||
|
|
|
@ -129,8 +129,8 @@ pub(crate) struct ScopeSlabEntry<'a> {
|
|||
}
|
||||
|
||||
impl<'a> ScopeSlabEntry<'a> {
|
||||
pub(crate) fn key(&self) -> usize {
|
||||
self.entry.key()
|
||||
pub(crate) fn key(&self) -> ScopeId {
|
||||
ScopeId(self.entry.key())
|
||||
}
|
||||
|
||||
pub(crate) fn insert(self, scope: ScopeState) -> &'a ScopeState {
|
||||
|
|
Loading…
Add table
Reference in a new issue