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 {
1818 #[ inline( always) ]
1919 fn get_class( name: & str ) -> Option <& ' static $crate:: runtime:: Class > {
2020 unsafe {
21+ #[ cfg_attr( feature = "cargo-clippy" , allow( replace_consts) ) ]
2122 static CLASS : :: std:: sync:: atomic:: AtomicUsize = :: std:: sync:: atomic:: ATOMIC_USIZE_INIT ;
2223 // `Relaxed` should be fine since `objc_getClass` is thread-safe.
2324 let ptr = CLASS . load( :: std:: sync:: atomic:: Ordering :: Relaxed ) as * const $crate:: runtime:: Class ;
@@ -46,6 +47,7 @@ macro_rules! sel_impl {
4647 #[ inline( always) ]
4748 fn register_sel( name: & str ) -> $crate:: runtime:: Sel {
4849 unsafe {
50+ #[ cfg_attr( feature = "cargo-clippy" , allow( replace_consts) ) ]
4951 static SEL : :: std:: sync:: atomic:: AtomicUsize = :: std:: sync:: atomic:: ATOMIC_USIZE_INIT ;
5052 let ptr = SEL . load( :: std:: sync:: atomic:: Ordering :: Relaxed ) as * const :: std:: os:: raw:: c_void;
5153 // 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