take_mut
take_mut copied to clipboard
Take no exit
These changes add take_no_exit()
function which uses sentinel value instead of exiting.
I'm not entirely sure what the point of release_sentinel
is.
It's optional if someone wants to implement custom handling. (i.e. logging if drop
was called instead of release_sentinel
or conditionally panic anyway to cause abort). It being unsafe
is just optimization. impl for Option<T>
doesn't use it.
Hmm maybe I should've provided default impl...
OK, I've provided default impl. Option<T>
still overrides it to optimize.