File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ macro_rules! class {
18
18
#[ inline( always) ]
19
19
fn get_class( name: & str ) -> Option <& ' static $crate:: runtime:: Class > {
20
20
unsafe {
21
+ #[ cfg_attr( feature = "cargo-clippy" , allow( replace_consts) ) ]
21
22
static CLASS : :: std:: sync:: atomic:: AtomicUsize = :: std:: sync:: atomic:: ATOMIC_USIZE_INIT ;
22
23
// `Relaxed` should be fine since `objc_getClass` is thread-safe.
23
24
let ptr = CLASS . load( :: std:: sync:: atomic:: Ordering :: Relaxed ) as * const $crate:: runtime:: Class ;
@@ -46,6 +47,7 @@ macro_rules! sel_impl {
46
47
#[ inline( always) ]
47
48
fn register_sel( name: & str ) -> $crate:: runtime:: Sel {
48
49
unsafe {
50
+ #[ cfg_attr( feature = "cargo-clippy" , allow( replace_consts) ) ]
49
51
static SEL : :: std:: sync:: atomic:: AtomicUsize = :: std:: sync:: atomic:: ATOMIC_USIZE_INIT ;
50
52
let ptr = SEL . load( :: std:: sync:: atomic:: Ordering :: Relaxed ) as * const :: std:: os:: raw:: c_void;
51
53
// It should be fine to use `Relaxed` ordering here because `sel_registerName` is
You can’t perform that action at this time.
0 commit comments