Skip to content

Commit 3dff60d

Browse files
committed
fixup! Get rid of a warning
1 parent 8e40dd6 commit 3dff60d

File tree

1 file changed

+4
-0
lines changed
  • signal-hook-registry/src

1 file changed

+4
-0
lines changed

signal-hook-registry/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ static GLOBAL_INIT: Once = ONCE_INIT;
304304
impl GlobalData {
305305
fn get() -> &'static Self {
306306
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).
307311
unsafe { data.as_ref().expect("We shall be set up already") }
308312
}
309313
fn ensure() -> &'static Self {

0 commit comments

Comments
 (0)