make dioxus dependancy optional
This commit is contained in:
1 parent
8dde4e492f
commit
6fe00c4f78
12 files changed
+1152
-1195
No files matched your search
@@ -659,7 +659,7 @@ impl AnySlab {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EntryBuilder<'a> {
|
||||
pub(crate) struct EntryBuilder<'a> {
|
||||
id: NodeId,
|
||||
inner: &'a mut AnySlab,
|
||||
}
|
||||
@@ -671,18 +671,6 @@ impl EntryBuilder<'_> {
|
||||
.insert(self.id, value);
|
||||
}
|
||||
|
||||
pub fn get<T: Any + Sync + Send>(&self) -> Option<&T> {
|
||||
self.inner.read_slab().get(self.id)
|
||||
}
|
||||
|
||||
pub fn get_mut<T: Any + Sync + Send>(&mut self) -> Option<&mut T> {
|
||||
self.inner.write_slab().get_mut(self.id)
|
||||
}
|
||||
|
||||
pub fn remove(self) {
|
||||
self.inner.remove(self.id);
|
||||
}
|
||||
|
||||
pub fn id(&self) -> NodeId {
|
||||
self.id
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user