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
@@ -3,7 +3,7 @@ use crate::{AtomId, AtomRoot, Readable, Writable};
|
||||
pub type Atom<T> = fn(AtomBuilder) -> T;
|
||||
pub struct AtomBuilder;
|
||||
|
||||
impl<V: 'static> Readable<V> for Atom<V> {
|
||||
impl<V> Readable<V> for Atom<V> {
|
||||
fn read(&self, _root: AtomRoot) -> Option<V> {
|
||||
todo!()
|
||||
}
|
||||
@@ -11,14 +11,11 @@ impl<V: 'static> Readable<V> for Atom<V> {
|
||||
(*self)(AtomBuilder)
|
||||
}
|
||||
fn unique_id(&self) -> AtomId {
|
||||
AtomId {
|
||||
ptr: *self as *const (),
|
||||
type_id: std::any::TypeId::of::<V>(),
|
||||
}
|
||||
*self as *const ()
|
||||
}
|
||||
}
|
||||
|
||||
impl<V: 'static> Writable<V> for Atom<V> {
|
||||
impl<V> Writable<V> for Atom<V> {
|
||||
fn write(&self, _root: AtomRoot, _value: V) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user