You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
implementation for boxed lists can be based on 1dcb155, and for UnsafeRef can be based on a153187 (these commits add implementations for doubly-linked lists).
these are implemented already I think. Can I ask why we'd want to use UnsafeRef when we have Option<NonNull>, I was under the impression the latter is optimized to be zero-sized when it's None. Under what circumstances do we want to give up that safety?
An UnsafeRef is just a NonNull<T> without the Option --- it's for use as an owning reference to a T, which should always exist. It's not wrapped in an Option because we don't expect it to ever be empty and want to enforce that
implementation for boxed lists can be based on 1dcb155, and for
UnsafeRef
can be based on a153187 (these commits add implementations for doubly-linked lists).https://github.com/hawkw/alarm/blob/2b0614ae6253ba44ffab2f6b8d3556bee003935b/intruder_alarm/src/doubly/mod.rs#L428-L464
the implementation for lists of
UnsafeRef
s depends on #37The text was updated successfully, but these errors were encountered: