bevy_reflect: Remove unnecessary allow(unused_mut). (#19930)

# Objective

The generated `GetTypeRegistration::get_type_registration` method has an
unnecessary `allow(unused_mut)` attribute. It used to be necessary
because it was possible for `registration` to not be modified, but now
there is always at least one modification.

## Solution

Remove the attribute.

## Testing

I checked the `cargo expand` output.
This commit is contained in:
Nicholas Nethercote 2025-07-04 08:27:58 +10:00 committed by GitHub
parent eed3085a37
commit 2d02f629b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,7 +43,6 @@ pub(crate) fn impl_get_type_registration<'a>(
});
quote! {
#[allow(unused_mut)]
impl #impl_generics #bevy_reflect_path::GetTypeRegistration for #type_path #ty_generics #where_reflect_clause {
fn get_type_registration() -> #bevy_reflect_path::TypeRegistration {
let mut registration = #bevy_reflect_path::TypeRegistration::of::<Self>();