Skip to content

Commit

Permalink
glib-macros: Remove &mut to static mut in object_subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
felinira authored and bilelmoussaoui committed Sep 26, 2024
1 parent b825e64 commit b40531f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glib-macros/src/object_impl_attributes/subclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub fn impl_object_subclass(input: super::Input) -> TokenStream {
fn type_data() -> ::std::ptr::NonNull<#crate_ident::subclass::TypeData> {
static mut DATA: #crate_ident::subclass::TypeData =
#crate_ident::subclass::types::TypeData::new();
unsafe { ::std::ptr::NonNull::from(&mut DATA) }
unsafe { ::std::ptr::NonNull::new_unchecked(::std::ptr::addr_of_mut!(DATA)) }
}

#[inline]
Expand Down

0 comments on commit b40531f

Please sign in to comment.