Revert "fix: use typeid of atoms for their unique ID (#558)"
This reverts commit bf9901a6cd.
This commit is contained in:
4 files changed
+11
-38
No files matched your search
@@ -4,7 +4,7 @@ use im_rc::HashMap as ImMap;
|
||||
pub struct AtomFamilyBuilder;
|
||||
pub type AtomFamily<K, V> = fn(AtomFamilyBuilder) -> ImMap<K, V>;
|
||||
|
||||
impl<K, V: 'static> Readable<ImMap<K, V>> for AtomFamily<K, V> {
|
||||
impl<K, V> Readable<ImMap<K, V>> for AtomFamily<K, V> {
|
||||
fn read(&self, _root: AtomRoot) -> Option<ImMap<K, V>> {
|
||||
todo!()
|
||||
}
|
||||
@@ -14,14 +14,11 @@ impl<K, V: 'static> Readable<ImMap<K, V>> for AtomFamily<K, V> {
|
||||
}
|
||||
|
||||
fn unique_id(&self) -> AtomId {
|
||||
AtomId {
|
||||
ptr: *self as *const (),
|
||||
type_id: std::any::TypeId::of::<V>(),
|
||||
}
|
||||
*self as *const ()
|
||||
}
|
||||
}
|
||||
|
||||
impl<K, V: 'static> Writable<ImMap<K, V>> for AtomFamily<K, V> {
|
||||
impl<K, V> Writable<ImMap<K, V>> for AtomFamily<K, V> {
|
||||
fn write(&self, _root: AtomRoot, _value: ImMap<K, V>) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user