Closed chemicstry closed 1 year ago
This refactors reference types with lifetimes (i.e. ControlListRef<'a>) into transparent pointers, which can be cast into references.
ControlListRef<'a>
Important changes:
Immutable<ControlListRef<'a>>
&ControlList
&mut ControlList
ControlList
ControlList::new() -> UniquePtr<ControlList>
UniquePtr<T>
Deref<Target = T>
Fixes #2
I'm merging this since it conflicts a lot with other PRs. We will resolve any problems later if they arise.
This refactors reference types with lifetimes (i.e.
ControlListRef<'a>
) into transparent pointers, which can be cast into references.Important changes:
Immutable<ControlListRef<'a>>
becomes&ControlList
ControlListRef<'a>
becomes&mut ControlList
ControlList
can only exist as a reference so new lists are created withControlList::new() -> UniquePtr<ControlList>
.UniquePtr<T>
implementsDeref<Target = T>
.Fixes #2