Closed arthurprs closed 2 months ago
This can be used to convert a RAII guard, for example. In my use-case I'm downgrading a Write guard to a Read guard.
AFAIK this doesn't need to be unsafe as it can rely on the safety of the previously built handle.
IIUC this is unsound because it would expose H, which might have a false lifetime (e.g., RefMut<'static, _>), to safe code.
H
RefMut<'static, _>
This can be used to convert a RAII guard, for example. In my use-case I'm downgrading a Write guard to a Read guard.
AFAIK this doesn't need to be unsafe as it can rely on the safety of the previously built handle.