fixed downcasting for widgets and scene nodes

- removed a bunch of unnecessary casts to &dyn Reflect
This commit is contained in:
Dmitry Stepanov
2026-05-22 20:31:20 +03:00
parent d821684037
commit bee807ea17
11 changed files with 27 additions and 19 deletions
+2 -2
View File
@@ -855,7 +855,7 @@ pub trait SceneGraph: 'static {
T: Reflect,
{
self.try_get_node(handle).and_then(|n| {
(n.inner_ref() as &dyn Reflect)
n.inner_ref()
.self_or_field_ref()
.ok_or(PoolError::NoSuchField(handle.into()))
})
@@ -869,7 +869,7 @@ pub trait SceneGraph: 'static {
T: Reflect,
{
self.try_get_node_mut(handle).and_then(|n| {
(n.inner_mut() as &mut dyn Reflect)
n.inner_mut()
.self_or_field_mut()
.ok_or(PoolError::NoSuchField(handle.into()))
})