We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e40dd6 commit 3dff60dCopy full SHA for 3dff60d
signal-hook-registry/src/lib.rs
@@ -304,6 +304,10 @@ static GLOBAL_INIT: Once = ONCE_INIT;
304
impl GlobalData {
305
fn get() -> &'static Self {
306
let data = GLOBAL_DATA.load(Ordering::Acquire);
307
+ // # Safety
308
+ //
309
+ // * The data actually does live forever - created by Box::into_raw.
310
+ // * It is _never_ modified (apart for interior mutability, but that one is fine).
311
unsafe { data.as_ref().expect("We shall be set up already") }
312
}
313
fn ensure() -> &'static Self {
0 commit comments