diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs index e7b7d1ab45c0e7..58bf48f7cec22b 100644 --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -681,6 +681,7 @@ impl_array_get_type_registration! { 30 31 32 } +<<<<<<< HEAD <<<<<<< HEAD ======= impl Reflect for Cow<'static, str> { @@ -868,6 +869,8 @@ impl Reflect for &'static Path { } >>>>>>> 748732a9 (new function for std.rs) +======= +>>>>>>> 440faacc (solved merge conflict with #6829) impl GetTypeRegistration for Option { fn get_type_registration() -> TypeRegistration { TypeRegistration::of::>() @@ -1199,6 +1202,21 @@ impl Reflect for Cow<'static, str> { } } +<<<<<<< HEAD +======= + fn try_apply(&mut self, value: &dyn Reflect) -> Result<(), ApplyError> { + let value = value.as_any(); + if let Some(value) = value.downcast_ref::() { + *self = value.clone(); + } else { + return Err(ApplyError::WrongType( + std::any::type_name::().to_string(), + )); + } + Ok(()) + } + +>>>>>>> 440faacc (solved merge conflict with #6829) fn set(&mut self, value: Box) -> Result<(), Box> { *self = value.take()?; Ok(()) @@ -1307,6 +1325,21 @@ impl Reflect for &'static Path { } } +<<<<<<< HEAD +======= + fn try_apply(&mut self, value: &dyn Reflect) -> Result<(), ApplyError> { + let value = value.as_any(); + if let Some(&value) = value.downcast_ref::() { + *self = value; + } else { + return Err(ApplyError::WrongType( + std::any::type_name::().to_string(), + )); + } + Ok(()) + } + +>>>>>>> 440faacc (solved merge conflict with #6829) fn set(&mut self, value: Box) -> Result<(), Box> { *self = value.take()?; Ok(())