Closed jdonszelmann closed 4 years ago
(After briefly skimming on my phone,) I think running with #27 is a good call.
As for the soundness of this PR, get_mut_impl
is not a solution. Instead, RingBuffer
should be an unsafe trait
, and the safety documentation could just be added to get_mut
. unsafe fn
s are unsafe to call, not implement.
That said, this PR does seem to be a fix at first glance - sealing RingBuffer
prevents misuse, and the trait is still used properly internally (though the unsafety should be documented properly anyway).
@Plecra Thanks for your input, has been helpful!
Closes #25