summaryrefslogtreecommitdiff
path: root/engine-macros/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-07-16 20:32:38 +0200
committerHampusM <hampus@hampusmat.com>2026-07-16 20:32:38 +0200
commitee5daec60b373210cb5b8de93959394b4b605382 (patch)
tree34967c132320ede0d6ef89fa480a3bf064668f82 /engine-macros/src
parent8dc188fbe6224155f6a48f8908402e98b169d0a6 (diff)
fix(engine-macros): allow unreachable code in struct reflection try_get_field_mut
Diffstat (limited to 'engine-macros/src')
-rw-r--r--engine-macros/src/reflection/struct_impl.rs6
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)
- },
+ } },
}
)
};