diff options
Diffstat (limited to 'engine-macros/src')
| -rw-r--r-- | engine-macros/src/reflection/struct_impl.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engine-macros/src/reflection/struct_impl.rs b/engine-macros/src/reflection/struct_impl.rs index 8617874..1cd9fb8 100644 --- a/engine-macros/src/reflection/struct_impl.rs +++ b/engine-macros/src/reflection/struct_impl.rs @@ -142,7 +142,9 @@ fn gen_impl( #get_default_value_fn }, cast_dyn_any: |ptr| ptr.cast::<Self>(), - try_get_field_mut: |target, field_index| { + try_get_field_mut: |target, field_index| { { + #![allow(unreachable_code)] + let target = target .downcast_mut::<Self>() .ok_or(GetError::WrongTargetType)?; @@ -157,7 +159,7 @@ fn gen_impl( }; Ok(field) - }, + } }, } ) }; |
