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 committed Sep 24, 2024
1 parent b97554d commit e7218d4
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 e7218d4

Please sign in to comment.