Open hawkw opened 6 years ago
these are implemented already I think. Can I ask why we'd want to use UnsafeRef when we have Option<NonNull
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 1dcb155eb5150be342c3abc1c0fe0f7fd26b09e3, and for
UnsafeRef
can be based on a15318754af30f1ffc64c1f40a8f77d217ad324d (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 #37