Skip to content

Commit b0f88c1

Browse files
chyyrangrovesNL
authored andcommitted
fix static mutable reference warning
1 parent 3a899f7 commit b0f88c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sync.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use super::*;
99
use block::{Block, RcBlock};
1010
use std::mem;
11+
use std::ptr;
1112

1213
#[cfg(feature = "dispatch_queue")]
1314
use dispatch;
@@ -63,7 +64,7 @@ impl SharedEventRef {
6364
*mut BlockBase<(&SharedEventRef, u64), ()>,
6465
>(block);
6566
(*block).flags |= BLOCK_HAS_SIGNATURE | BLOCK_HAS_COPY_DISPOSE;
66-
(*block).extra = &BLOCK_EXTRA;
67+
(*block).extra = ptr::addr_of!(BLOCK_EXTRA);
6768
let () = msg_send![self, notifyListener:listener atValue:value block:block];
6869
}
6970

0 commit comments

Comments
 (0)